> For the complete documentation index, see [llms.txt](https://nicologies.gitbook.io/awesome-programming-knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nicologies.gitbook.io/awesome-programming-knowledge/csharp/articles/asyncawait/asyncawait-best-practices-in-asynchronous-programming.md).

# Async/Await - Best Practices in Asynchronous Programming

* Avoid async void except the top level event handlers
* Async all the way even the main function (with C# 7.1)
* Use `ConfigureAwait(false)` in library and let the consumer choose the context

For more details, see Stephen Cleary's [blog post](https://msdn.microsoft.com/en-us/magazine/jj991977.aspx) or Mads Torgerse's [video](https://www.youtube.com/watch?v=H4EmfpsYcfs)
