What problem does it solve?
It helps you choose the right concurrency abstraction in .NET so you can avoid race conditions, deadlocks, and overly complex synchronization.
Core Features & Use Cases
- Async-first decision making (async/await + Task.WhenAll/WhenAny): Use for I/O-bound work and coordinating independent asynchronous operations, with a focus on cancellation and avoiding blocking.
- Parallelism with controlled concurrency (Parallel.ForEachAsync): Use for CPU-bound processing across collections while limiting concurrency to a safe degree.
- Producer/consumer orchestration (System.Threading.Channels): Use for work queues and backpressure so producers and consumers can run at different speeds.
- Escalation to advanced models (Rx, Akka.NET Streams, Akka.NET Actors): Use when you need UI/client event composition (Rx), server-side backpressure with batching/throttling (Akka.NET Streams), or stateful entity/state-machine management (Akka.NET Actors).
Quick Start
Use csharp-concurrency-patterns to decide whether your scenario is better handled by async/await, Parallel.ForEachAsync, Channels, Rx, or Akka.NET based on the type of workload and required guarantees.