Examples from Chapter 17 (Asynchronous Language Features) of Programming C# 8.0 (O'Reilly).
- Example 1. Using async and await when fetching HTTP headers
- Example 2. Calling the asynchronous method
- Example 3. Manual asynchronous coding
- Example 4. ConfigureAwait
- Example 5. Multiple asynchronous operations
- Example 6. An incomplete manual asynchronous loop
- Example 7. The non-async-friendly IEnumerator.MoveNext
- Example 8. IAsyncEnumerable<T> and IAsyncEnumerator<T>
- Example 9. Consuming and producing asynchronous enumerables
- Example 10. Consuming and implementing IAsyncDisposable
- Example 11. Returning a Task
- Example 12. Returning a Task<T>
- Example 13. An asynchronous lambda
- Example 14. Calling a custom awaitable implementation
- Example 15. An excessively simple await pattern implementation
- Example 16. A very rough approximation of what await does
- Example 17. A slightly closer approximation to how await works
- Example 18. Multiple potential points of failure
- Example 19. Handling exceptions from await
- Example 20. Potentially surprising argument validation
- Example 21. Validating arguments for async methods
- Example 22. Throwless awaiting followed by Wait
- Example 23. Looking for additional exceptions
- Example 24. How not to run multiple concurrent operations