~/talk

Avoiding common pitfalls with async/await

Talkat NDC Copenhagen 2025 · 2025-09-08..09-12· [concurrency, c-sharp]
links:none on file
slides:none on file

Explains why async turns methods into a compiler-generated state machine, how await pauses on a Task or ValueTask and resumes on the captured context (demoed in a WPF app), and why avoid async void and don't block async actually break shutdown, deadlock or starve the thread pool; lists dangerous APIs (ContinueWith, StartNew, Task ctor), rules for ValueTask: consume once, never block, how WaitAsync cancels the await not the underlying task, and includes sample slides and channel demos.

AI-written summary · about

  1. 0:00Introduction and context
  2. 3:06Async and await basics
  3. 7:05How await works
  4. 12:24Common conceptual mistakes
  5. 14:15Async mental models
  6. 18:44Async in UI applications
  7. 21:43Tasks and ValueTasks
  8. 26:04Top async pitfalls
  9. 30:53Other common mistakes
  10. 36:56Advanced pitfalls
  11. 45:44Task composition and tools
  12. 55:54Bonus round 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.