~/talk

Designing and rewriting asynchronous tasks from scratch

Talkat Update Conference Prague 2021 · 2021-11-18..11-19· [concurrency]
slides:none on file

Starts by building a minimal Task and TaskCompletionSource, then adds continuations, a TaskScheduler, and inlining so continuations can run concurrently; implements a state machine and custom TaskAwaiter/TaskBuilder to support async/await; demonstrates boxing and allocation pitfalls and fixes that reduce heap allocations; reproduces ConfigureAwait behavior and explains when ConfigureAwait(true/false) actually matters and why state machine boxing causes duplicate tasks; all code is implemented and runs.

AI-written summary · about

  1. 0:00Introduction to async
  2. 3:00Basic task implementation
  3. 6:43Implementing continuations
  4. 14:59Task scheduling and inlining
  5. 22:41Reimplementing async/await
  6. 30:13Abstracting awaitables
  7. 36:15Performance optimizations
  8. 50:11Context and ConfigureAwait
  9. 56:50Q&A and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.