~/talk

Async internals in .NET

Talkat Update Conference Prague 2019 · 2019-11-14..11-15· [dotnet, concurrency]
slides:none on file

Explains how C# compiler turns a short async method into a ~130-line state machine, shows that no thread dedicated to running the task (tasks are promises, not threads), and digs into Task, TaskCompletionSource, SynchronizationContext and ValueTask allocation tradeoffs. Demonstrates deadlocks from capturing UI sync context and the rule use async all the way up — never call .Wait()/.Result. Builds a custom task scheduler plus synchronization context to await async void by converting continuations to tasks — the hack works and recovers exceptions.

AI-written summary · about

  1. 0:00Start
  2. 1:13Async internals in .NET
  3. 5:31Task details
  4. 22:27State machine
  5. 34:09Deadlocks
  6. 41:26Exception handling
~/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.