~/talk

Async programming in .NET: Best practices

Talkat DotNext 2019 Piter · 2019-05-15..05-16· [concurrency, dotnet]
links:none on file
slides:none on file

Claims that async/await semantics hide dangerous defaults and many Task options cause surprising behavior, shows a real production deadlock in a Rider-style pipeline caused by TaskCreationOptions/TaskScheduler and a TaskCompletionSource running continuations synchronously, and proves fixes: replace a blocking queue and locks with System.Threading.Channels, avoid implicit SynchronizationContext by using ConfigureAwait(false) and explicit cancellation via async locals, and simplify lifecycle and cancellation with JetBrains.Lifetimes — the rewritten channel-based pipeline is shorter, deterministic and eliminates the intermittent races.

AI-written summary · about

  1. 0:00Introduction to async
  2. 1:24Tooling issues
  3. 4:15Async programming evolution
  4. 10:56Task parameters complexity
  5. 27:57Async/await solutions
  6. 36:20Context and threads
  7. 40:37Real-world example
  8. 47:05Parallel async code
  9. 47:48Locks to channels
  10. 50:35Best practices summary
  11. 52:24Q&A
~/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.