Best practices for using async and await

October 19th 2021 .NET DeveloperDays 2021 Warsaw, Poland

The async and await keywords have been a part of the C# programming language for a long time. Despite that, they still hide pitfalls that not only beginners but also more experienced developers occasionally fall into.

In this talk, I will present some of the most common mistakes we can make when writing asynchronous code and show ways to avoid them. Key topics:

  • async void is dangerous
  • avoiding deadlocks
  • synchronization context

Copyright
Creative Commons License