dotnet-csharp-concurrency-patterns
Installation
SKILL.md
dotnet-csharp-concurrency-patterns
Thread synchronization primitives, concurrent data structures, and a decision framework for choosing the right concurrency mechanism. Covers lock/Monitor, SemaphoreSlim, Interlocked, ConcurrentDictionary, ConcurrentQueue, ReaderWriterLockSlim, and SpinLock. This skill is the authoritative source for synchronization and thread-safe data access patterns.
Version assumptions: .NET 8.0+ baseline. All primitives covered are available from .NET Core 1.0+ but examples use modern C# idioms.
Scope
- lock/Monitor, SemaphoreSlim, and Interlocked patterns
- ConcurrentDictionary, ConcurrentQueue, and concurrent collections
- ReaderWriterLockSlim and SpinLock for advanced scenarios
- Concurrency primitive decision framework
Out of scope
- Async/await and Task-based patterns -- see [skill:dotnet-csharp-async-patterns]
- Producer/consumer with Channel -- see [skill:dotnet-channels]
- Naming and style conventions -- see [skill:dotnet-csharp-coding-standards]