
Csharp Concurrency Patterns
This is a decision tree for .NET concurrency that starts with async/await and only escalates when you have a specific need it can't handle. You get a flowchart covering everything from I/O waits to producer/consumer patterns with Channels to entity management with Akka.NET actors. The philosophy is sound: most problems don't need locks or manual synchronization, and shared mutable state is usually a design smell. What makes this useful is the concrete guidance on when each tool fits. If you're reaching for a SemaphoreSlim or spinning up manual threads, this will probably show you a better abstraction. The anti-patterns section alone is worth reading.
- skills.sh installs
- 1.6K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aaronontheweb/dotnet-skills --skill csharp-concurrency-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
.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.
Most concurrency problems can be solved with async/await. Only reach for more sophisticated tools when you have a specific need that async/await can't address cleanly.
Try to avoid shared mutable state. The best way to handle concurrency is to design it away. Immutable data, message passing, and isolated state (like actors) eliminate entire categories of bugs.
Sponsors
Details
- Repository
- github.com/aaronontheweb/dotnet-skills
- Category
- .NET & C#
More from aaronontheweb/dotnet-skills
All 34- Efcore Patterns1.6K
- Dependency Injection Patterns703
- Database Performance700
- Dotnet Project Structure692
- Api Design690
- Type Design Performance684
- Ilspy Decompile640
- Package Management613
- Microsoft Extensions Configuration609
- Serialization596
- Crap Analysis581
- Dotnet Slopwatch580
- Testcontainers Integration Tests579
- Playwright Blazor Testing560
- Dotnet Local Tools550
- Aspire Integration Testing522
- Mjml Email Templates513
- Aspire Service Defaults497
- Aspire Configuration487
- Snapshot Testing484
- Dotnet Devcert Trust457
- Skills Index Snippets456
- Playwright Ci Caching455
- Akka Net Best Practices451