Best practices for using async and await

May 12th 2021 JetBrains .NET Days Online 2021 Online

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