Some guidelines/best practices while writing with asynchronous code are the following:
- Avoid using async void.
- Async chain all the way.
- Use ConfigureAwait wherever possible.
We will learn more about these in the following sections.
Some guidelines/best practices while writing with asynchronous code are the following:
We will learn more about these in the following sections.
We have already seen how returning void from async methods actually affects the exception handling. Async methods should return Task or Task<T> so that exceptions can be observed and not become unhandled.
Mixing async and blocking methods will have an impact...