What problem does it solve?
Async-patterns helps eliminate common asynchronous programming bugs in .NET such as unpropagated cancellation, deadlocks caused by blocking on async code, unobserved exceptions from fire-and-forget usage, and inefficient async patterns that harm performance.
Core Features & Use Cases
- Propagates guidance to accept and forward CancellationToken through call chains to enable cooperative cancellation.
- Recommends and explains patterns for parallelism, streaming, hot-path optimization with ValueTask, async initialization, and timeout handling with linked CancellationTokenSources.
- Detects anti-patterns including async void, blocking on Task with Result or GetAwaiter, inappropriate Task.Run usage in request handlers, and misused ConfigureAwait.
- Use cases include auditing web endpoints for cancellation support, converting blocking calls to await-based flows, implementing producer/consumer channels, and designing robust BackgroundService scoped work.
Quick Start
Use the async-patterns skill to audit your .NET project for missing CancellationToken propagation and blocking async calls.