~/talk

Back to Basics: Efficient Async and Await

Talkat NDC Oslo 2023 · 2023-05-22..05-26· [testing]
slides:none on file

Covers practical C# async/await behavior with concrete pitfalls and fixes: demonstrates Task and Task.Run semantics, shows that never use Task.Run in ASP.NET because it consumes thread-pool threads, reproduces deadlocks caused by .Result / Wait and how awaiting avoids them, explains why avoid async void (exceptions crash the app and work can’t be observed), inspects the generated state machine, explains cancellation tokens, demos IAsyncEnumerable streaming, and recommends await top-level and prefer OS-backed async APIs over wrapping sync code.

AI-written summary · about

  1. 0:00Efficient async await in C#
  2. 1:23Why async programming matters
  3. 8:42Task Parallel Library fundamentals
  4. 17:51Pitfalls with Task.Run
  5. 20:37Async await explained
  6. 25:34Converting sync to async
  7. 31:25Async void dangers
  8. 35:55Deadlocks in async code
  9. 44:44Skip async await for perf
  10. 48:57Cancellation tokens
  11. 51:02Async enumerables
  12. 56:56ConfigureAwait best practices
  13. 59:05Key takeaways
~/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.