~/talk

Correcting Common Mistakes in Asynchronous .NET Code

Talkat Update Conference Prague 2018 · 2018-11-22..11-23· [dotnet, concurrency]
slides:none on file

The .NET compiler turns every async method into a generated state-machine class that adds about 100 bytes and a MoveNext method wrapped in a try/catch that swallows exceptions unless awaited. Recommendations: avoid Task.Wait/Task.Result (use GetAwaiter().GetResult if you must), prefer await, use ConfigureAwait(false) in non-UI layers to avoid needless thread hops, and restrict async void to event handlers. Provides a SafeFireAndForget extension and an AsyncCommand NuGet, plus a ValueTask suggestion for hot paths to reduce allocations and improve performance and exception behavior.

AI-written summary · about

  1. 0:00Start
  2. 1:58Multi-Threading
  3. 2:38Thread Pool
  4. 4:13Thread 1
  5. 6:21Synchronization Context
  6. 7:06Intermediate Language
  7. 21:14Execute Refresh Command
  8. 27:13Exception Handling
  9. 29:52Get Top Stories
  10. 36:39Value Task
  11. 39:37Mvvm
  12. 41:59Resources
  13. 46:42Set the Property That Will Change the Ui with the Data Binding
~/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.