series
Async/Await in C#
Practical patterns for writing reliable, scalable async code in C#.
Parts8
What Is Async/Await in C# and Why Does It Exist?Async/await is not about making code faster. It is about not holding a thread hostage while it waits for I/O. This part explains the problem async solves and the mental model behind it.4 min read
How async/await Works: The C# State Machine ExplainedThe compiler transforms every async method into a state machine that suspends at each await and resumes with local variables intact. This part shows what that transformation looks like and what it costs.4 min read
How Async/Await Improves Throughput and Responsiveness in C#Blocking threads during I/O wastes capacity. Async handlers free threads while waiting, so a web API serves more concurrent requests and a desktop app stays responsive during data loads.4 min read
Async vs Parallel in C#: I/O-Bound vs CPU-Bound WorkAsync frees threads during I/O waits. Parallel divides CPU work across cores. They solve different problems and should not be swapped. This part explains when to use each and when to combine both.4 min read
Continuations and SynchronizationContext in C#After an await completes, the method resumes on a thread determined by the captured SynchronizationContext. In UI apps that means the UI thread; in ASP.NET Core it means a thread-pool thread. This is what ConfigureAwait(false) controls.4 min read
Exception Handling in Async C# MethodsExceptions in async code are captured by the Task and re-thrown at the await point - not where they were thrown. This part covers where to catch them, why async void makes them disappear, and how to handle Task.WhenAll failures.5 min read
How to Design Reliable Async Methods in C#Reliable async methods return Task, accept CancellationToken, and surface failures clearly. This part covers the structural decisions that make async methods composable and predictable for callers.5 min read
Async Best Practices in C#A checklist of async habits that prevent the most common bugs: keeping the async chain intact, avoiding .Result, using ConfigureAwait correctly, forwarding CancellationToken, and handling fire-and-forget exceptions.5 min read