skills/ozerohax/assistagents/coder-csharp-async-concurrency

coder-csharp-async-concurrency

SKILL.md

<skill_overview> Build reliable async flows and safe multi-threaded code Writing async methods Coordinating multiple tasks Adding cancellation support Working with concurrent collections Async Scenarios Thread-Safe Collections System.Threading.Channels </skill_overview> <async_await_rules> Use async/await end-to-end; avoid blocking waits Return Task/ValueTask, not void (except event handlers) Use ConfigureAwait(false) in library code </async_await_rules> <task_coordination> Use Task.WhenAll for independent work Use Task.WhenAny for first-completion patterns Handle exceptions from all tasks await Task.WhenAll(fetchUserTask, fetchOrdersTask); </task_coordination> Accept CancellationToken in cancellable APIs Pass the token to all awaited operations Respect cancellation promptly <concurrency_primitives> Use ConcurrentDictionary, ConcurrentQueue, ConcurrentBag for shared collections Use Channel for producer-consumer pipelines Keep lock scope minimal and consistent </concurrency_primitives> Never use .Result or .Wait on async operations Avoid blocking inside async methods Do not capture synchronization context in libraries <anti_patterns> Blocking on async tasks async void outside event handlers Mutable shared state without synchronization </anti_patterns>

Weekly Installs
2
GitHub Stars
25
First Seen
Feb 4, 2026
Installed on
openclaw2
gemini-cli2
qwen-code2
cursor2
opencode2
mcpjam1