Namespace SixLabors.ImageSharp.Web.Synchronization
Classes
- AsyncKeyLock<TKey>
Extension of the AsyncLock that enables fine-grained locking on a given key. Concurrent lock requests using different keys can execute simultaneously, while requests to lock using the same key will be forced to wait. This object is thread-safe and internally uses a pooling mechanism to minimize allocation of new locks.
- AsyncKeyReaderWriterLock<TKey>
Extension of the AsyncReaderWriterLock that enables fine-grained locking on a given key. Concurrent write lock requests using different keys can execute simultaneously, while requests to lock using the same key will be forced to wait. This object is thread-safe and internally uses a pooling mechanism to minimize allocation of new locks.
- AsyncLock
An asynchronous locker that uses an IDisposable pattern for releasing the lock.
- AsyncReaderWriterLock
An asynchronous locker that provides read and write locking policies.
This is based on the following blog post: https://devblogs.microsoft.com/pfxteam/building-async-coordination-primitives-part-7-asyncreaderwriterlock/
- RefCountedConcurrentDictionary<TKey, TValue>
Represents a thread-safe collection of reference-counted key/value pairs that can be accessed by multiple threads concurrently. Values that don't yet exist are automatically created using a caller supplied value factory method, and when their final refcount is released they are removed from the dictionary.