Table of Contents

Namespace LfrlAnvil.Async

Classes

AsyncKeyedMutex<TKey>

Represents a source of a keyed collection of fair asynchronous mutex primitives.

AsyncKeyedReaderWriterLock<TKey>

Represents a source of a keyed collection of fair asynchronous reader-writer locks.

AsyncMutex

Represents a source of a fair asynchronous mutex primitive.

AsyncReaderWriterLock

Represents a source of a fair asynchronous reader-writer lock.

Batch<T>

Represents a queue of elements, which are processed in batches, automatically or on demand.

Cancellable

Creates instances of Cancellable<T> type.

ConcurrentReadOnlyCollection<T>

Wraps an IReadOnlyCollection<T> instance in a thread-safe object.

CounterTask

An object that contains an underlying Task that gets completed once Count reaches the Limit.

DedicatedThreadSynchronizationContext

Represents a SynchronizationContext with a dedicated underlying Thread.

ManualResetValueTaskSource<TResult>

Represents an implementation of an object that can be wrapped by a ValueTask<TResult>.

TaskRegistry

Represents an object useful for storing in-progress Task instances.

Structs

AsyncKeyedMutexToken<TKey>

Represents an acquired lock from an AsyncKeyedMutex<TKey> instance.

AsyncKeyedReaderWriterLockReadToken<TKey>

Represents an acquired read lock from an AsyncKeyedReaderWriterLock<TKey> instance.

AsyncKeyedReaderWriterLockUpgradeableReadToken<TKey>

Represents an acquired upgradeable read lock from an AsyncKeyedReaderWriterLock<TKey> instance.

AsyncKeyedReaderWriterLockUpgradedReadToken<TKey>

Represents an acquired read lock upgraded to the write level from an AsyncKeyedReaderWriterLock<TKey> instance.

AsyncKeyedReaderWriterLockWriteToken<TKey>

Represents an acquired write lock from an AsyncKeyedReaderWriterLock<TKey> instance.

AsyncMutexToken

Represents an acquired lock from an AsyncMutex instance.

AsyncReaderWriterLockReadToken

Represents an acquired read lock from an AsyncReaderWriterLock instance.

AsyncReaderWriterLockUpgradeableReadToken

Represents an acquired upgradeable read lock from an AsyncReaderWriterLock instance.

AsyncReaderWriterLockUpgradedReadToken

Represents an acquired read lock upgraded to the write level from an AsyncReaderWriterLock instance.

AsyncReaderWriterLockWriteToken

Represents an acquired write lock from an AsyncReaderWriterLock instance.

Cancellable<T>

A lightweight object with a generic value and a CancellationToken instance.

ExclusiveLock

A lightweight, disposable object representing an acquired monitor lock.

InterlockedBoolean

A lightweight representation of an Interlocked (atomic) bool.

InterlockedEnum<T>

A lightweight representation of an Interlocked (atomic) Enum.

InterlockedInt32

A lightweight representation of an Interlocked (atomic) int.

InterlockedInt64

A lightweight representation of an Interlocked (atomic) long.

InterlockedRef<T>

A lightweight representation of an Interlocked (atomic) ref type.

ReadLockSlim

A lightweight, disposable object representing an acquired read lock.

SemaphoreEntrySlim

A lightweight, disposable object representing an acquired semaphore entry.

SpinLockEntry

A lightweight, disposable object representing an acquired spin lock.

SynchronizationContextSwitch

A disposable current SynchronizationContext switch object that reverts the change once it gets disposed.

TaskSchedulerCapture

A lightweight object capable of extracting TaskScheduler instances from the current SynchronizationContext and capturing them.

ThreadParams

Represents a set of Thread parameters.

UpgradeableReadLockSlim

A lightweight, disposable object representing an acquired upgradeable read lock.

WriteLockSlim

A lightweight, disposable object representing an acquired write lock.

Interfaces

IBatch<T>

Represents a queue of elements, which are processed in batches, automatically or on demand.

Enums

BatchQueueOverflowStrategy

Represents a strategy for handling IBatch<T> element overflow, according to its QueueSizeLimitHint property.

TaskSchedulerCaptureStrategy

Represents a strategy for capturing a task scheduler.