Writing proper async code with ConfigureAwait

While the 'async' and 'await' keywords look easy to use, there is a lot going on underneath the covers. ConfigureAwait is a cool little method that can solve nagging issues with asynchronous development.

Console.WriteLine("Before");

await DoWorkAsync().ConfigureAwait(continueOnCapturedContext: false);

Console.WriteLine("After"); // on which thread does this run?

Learn all about it with this video:

Currently rated 5.0 by 2 people

  • Currently 5.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5