.NET Core and More

TH11 Async internals in .NET

05/21/2020

11:00am - 12:15pm

Level: Advanced

Adam Furmanek

Software Developer

Amazon

Async and await are now common elements of .NET ecosystem. Do you know how they work? Do you know about synchronization context, how to wait for async void methods, or how to implement custom task scheduler?

In this talk, Adam will show internals of async and await. He will present state machine created by the compiler, consider allocation issues, and show typical deadlock scenarios. We will see how to call async methods from synchronous code, how to wait for async void, how to implement custom synchronization context or task scheduler to handle exceptions, and how to run task without allocation at all.

You will learn:

  • State machine generated by the compiler
  • Details of TPL and synchronization contexts
  • How to debugcommon deadlock scenarios