~/talk

I'll Get Back to You: Task, Await, and Asynchronous Methods

Talkat TechBash 2018 · 2018-10-02..10-05· [concurrency]
links:none on file
slides:none on file

C# demos show a WPF app with three buttons and a listbox, using Task.Delay(3000) to simulate async work and exposing the real pitfalls: deadlocks from accessing Task.Result on the UI thread, the pain of ContinueWith’s ~40 overloads and using TaskScheduler.FromCurrentSynchronizationContext to marshal back, how await preserves context (and how ConfigureAwait(false) breaks UI marshaling), handling AggregateException via AggregateException.Flatten, and cancellation with CancellationTokenSource and token.ThrowIfCancellationRequested.

AI-written summary · about

  1. 0:00Introduction
  2. 1:00Asynchronous Patterns
  3. 6:30Task Delay
  4. 10:09Event Handler Setup
  5. 10:54Task of List of Person
  6. 11:35Task for Results
  7. 20:38From Current Synchronization Context
  8. 22:16Using Lambda Expressions
  9. 27:51Await
  10. 31:39ConfigureWaitFalse
  11. 33:15UI Issues
  12. 34:38Await Button
  13. 36:08Task Button
  14. 37:38Exception Handling
  15. 39:30Aggregate Exception
  16. 40:00If Statement
  17. 40:26Cancel Statement
  18. 41:48Status Property
  19. 43:26flattenat
  20. 45:24catch exception
  21. 46:46cancellation
  22. 49:34testing
  23. 54:38cancel token
  24. 56:39Await method
~/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.