Async
5 posts tagged “Async”.
September 2026
-
Pass your CancellationToken all the way down
When a caller gives up on a request, your code should stop working on it too. It only takes a parameter, but you have to pass it through every layer.
May 2026
-
Do you still need ConfigureAwait(false)?
In ASP.NET Core application code, no. In libraries, yes. Here's why the answer depends on where your code runs.
March 2026
-
Stream results with IAsyncEnumerable
Loading 100,000 rows into a list before sending the first one wastes memory and time.
IAsyncEnumerable<T>lets you process and return items as they arrive.
February 2026
-
Stop using async void and fire-and-forget
async voidcan crash your process, and_ = Task.Run(...)in a web request quietly loses errors and uses disposed services. Here's what to do instead.
December 2025
-
ValueTask: when to use it and when not to
ValueTask<T>can save an allocation on hot paths. It also comes with rules thatTaskdoesn't have, and breaking them causes bugs that are hard to trace.