Class ValueTaskSourceObjectPools<TKey>
- Namespace
- CryptoHives.Foundation.Threading.Pools
- Assembly
- CryptoHives.Foundation.Threading.dll
Provides a shared pool of pooled ValueTask sources for AsyncKeyedLock<TKey>.
public static class ValueTaskSourceObjectPools<TKey> where TKey : notnull
Type Parameters
TKeyThe key type of the AsyncKeyedLock<TKey> using this pool.
- Inheritance
-
ValueTaskSourceObjectPools<TKey>
- Inherited Members
Remarks
ValueTaskSourceObjectPools cannot hold this pool because its Releaser type is
generic over TKey. Declaring it here instead means the CLR creates one
shared static pool per closed TKey type, the same technique
Shared uses.
Fields
ValueTaskSourcePoolAsyncKeyedLockReleaser
Holds the shared ValueTaskSourceObjectPool<T> object pool for AsyncKeyedLock<TKey>.Releaser.
public static readonly ValueTaskSourceObjectPool<AsyncKeyedLock<TKey>.Releaser> ValueTaskSourcePoolAsyncKeyedLockReleaser