Wait, What? C# Async-Await Explained
summary
Claims that C# async-await does not automatically run things in parallel but instead frees thread pool threads by emitting a continuation and relying on the OS completion mechanism IOCP. Demonstrates with HttpClient REST examples that awaiting sequentially is effectively synchronous, contrasts that with creating tasks and awaiting Task.WhenAll to get true overlap, uses a three-thread thought experiment and tens-of-thousands scale reasoning to show why this actually works for high-concurrency servers.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:24Why async matters in C#
- 2:48Async vs sync analogy
- 4:54Code example surprises
- 6:17Problem async solves
- 8:05Thread pool mechanics
- 9:50Continuations free threads
- 12:00Async purpose and scalability
- 13:25Async in cloud essential
- 13:47Proper async with Task.WhenAll
- 15:14IO vs CPU work
- 17:01IOCP powers async
- 18:29Summary
related talks
57mMultithreaded and Asynchronous Programming in .NET
56mOptimizing your HttpClient usage
40mToo… Much… Async… What to Watch for When Working with a Feature
59mThe Background on Background Tasks in .NET Core
01h 02mAn introduction to multithreading in C++20
41mTaskJob: Manage .NET Tasks as PowerShell Jobs!
01h 06mThe Background on Background Tasks in .NET 6
01h 00mOptimizing your HttpClient usage
