Pushing 'await' to the Limits: Unleashing Multi-Threading Power in .NET
summary
Claims that awaiting can drive a fork‑join parallel loop by providing a custom task‑like type and a method builder that forks by shallow‑copying the generated state machine, stores per‑thread IDs in an AsyncLocal parallel context, and joins in IAsyncDisposable/IAsyncEnumerable disposal. Implements a parallel foreach as an extension (called something like AsParallelAsync), shows it runs correctly, measures comparable or faster times in a toy benchmark, and notes cancellation is not yet supported.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 0:34What is Asyn
- 1:34Data Parallelization
- 2:29C
- 3:38A
- 7:21Method Builder
- 9:25Fork Join Model
- 11:02State Machine
- 13:55Execution Context
- 15:32Join
- 24:11Storing Data
- 28:31Another Idea
- 30:28Conclusion
- 31:12QA
related talks
59mAsynchronous Programming From The Ground Up
01h 11mEverything You (Don’t) Want to Know About Async and Await in C#
57mAsync programming in .NET: Best practices
57mAsynchronous streams
01h 03mThis is not the Async you are looking for
01h 04mMaking fun with parallelism in .NET
30mThe untapped power of parallel programming: build efficient code that scales
01h 15mBest Practices for Using async and await
