Choosing the right concurrency abstraction in .NET - from async/await for I/O to Channels for producer/consumer to Akka.NET for stateful entity management.…
Navigate .NET concurrency from async/await through Channels to Akka.NET based on your specific problem. Start with async/await for I/O-bound work; escalate only when you hit a concrete limitation that simpler tools can't address cleanly Use Parallel.ForEachAsync for CPU-bound parallelism, Channel<T> for producer/consumer decoupling with backpressure, and Reactive Extensions for UI event composition Akka.NET Actors handle stateful entity management, state machines with Become(), and distributed scenarios; Akka.NET Streams provide server-side batching and throttling Avoid locks, manual thread creation, and blocking on async code; prefer immutability, message passing, and System.Collections.Concurrent when shared state is unavoidable .NET Concurrency: Choosing the Right Tool When to Use This Skill Use this skill when: Deciding how to handle concurrent operations in .NET Evaluating whether to use async/await, Channels, Akka.NET, or other abstractions Tempted to use locks, semaphores, or other synchronization primitives Need to process streams of data with backpressure, batching, or debouncing Managing state across multiple concurrent entities Reference Files advanced-concurrency.md: Akka.NET Streams, Reactive Extensions, Akka.NET Actors (entity-per-actor, state machines, cluster sharding), and async local function patterns The Philosophy Start simple, escalate only when needed.
don't have the plugin yet? install it then click "run inline in claude" again.