Dotnext Concurrency

Concurrent data structures and allocation-free async building blocks from the DotNext.Threading NuGet package - AsyncLazy, TaskCompletionPipe, reusable ValueTaskCompletionSource, CancellationTokenMultiplexer, AsyncCounter (throttling), AsyncStateTracker, distributed leases, BoundedObjectPool and the SIEVE-based RandomAccessCache (managed and unmanaged-memory variants). Use when replacing Lazy<T> or Lazy<Task<T>> with async initialization; when reducing allocations of TaskCompletionSource, linked CancellationTokenSource or Task.WhenEach in hot paths; when implementing rate limiting, change notification streams, an object pool, an LRU/concurrent cache (including a large cache that puts pressure on GC), or a distributed lease.

.NET (Microsoft) Updated 22.1k repo stars

File contents

dotnet/dotnext commit 865d94701b

Frequently asked questions

npx get-skill add dotnet/dotnext-concurrency