~/talk

Back to Basics: Efficient Async and Await

Talkat NDC Sydney 2019 · 2019-10-14..10-18· [concurrency, dotnet]
slides:none on file

Shows exactly what causes deadlocks: blocking a Task with .Result or Wait on a UI or request thread and how that state machine generated by async/await marshals continuations back to the original context. Demonstrates concrete fixes: replace async void with Task, use Task.Run to offload CPU work, remove needless awaits to avoid extra state machines, use CancellationToken and IAsyncEnumerable for streaming/cancelable work, and use ConfigureAwait(false) (or platform-appropriate alternatives) in libraries. Includes WPF demos (Dispatcher), Task.WhenAll, and a live deadlock example.

AI-written summary · about

  1. 0:00Start
  2. 1:22Why bother?
  3. 4:42Blocking - Non Blocking Code
  4. 6:29Task Parallel Library
  5. 6:59What's a Task?
  6. 16:09async & await
  7. 27:46State Machine?
  8. 28:41What does applying async really do?
  9. 29:57Inside the State Machine
  10. 35:16Deadlocks...
~/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.