Table of Contents

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

TKey

The 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

public static readonly ValueTaskSourceObjectPool<AsyncKeyedLock<TKey>.Releaser> ValueTaskSourcePoolAsyncKeyedLockReleaser

Field Value

ValueTaskSourceObjectPool<AsyncKeyedLock<TKey>.Releaser>