8 Task asynchronicity for the win
- Understanding the Task-based Asynchronous Programming model (TAP)
- Performing numerous asynchronous operations in parallel
- Customizing asynchronous execution flow
Asynchronous programming has become a major topic of interest over the last several years. In the beginning, asynchronous programming was used primarily on the client side to deliver a responsive GUI and to convey a high-quality user experience for customers. To maintain a responsive GUI, asynchronous programming must have consistent communication with the backend, and vice versa, or delays may be introduced into the response time. An example of this communication issue is when an application window appears to hang for a few seconds while background processing catches up with your commands.
8.1 The Asynchronous Programming Model (APM)
8.1.1 The value of asynchronous programming
8.1.2 Scalability and asynchronous programming
8.1.3 CPU-bound and I/O-bound operations
8.2 Unbounded parallelism with asynchronous programming
Asynchrony vs. parallelism
8.3 Asynchronous support in .NET
8.3.1 Asynchronous programming breaks the code structure
8.3.2 Event-based Asynchronous Programming
8.4 C# Task-based Asynchronous Programming
8.4.1 Anonymous asynchronous lambdas
8.4.2 Task<T> is a monadic container
8.5 Task-based Asynchronous Programming: a case study
8.5.1 Asynchronous cancellation
8.5.2 Task-based asynchronous composition with the monadic Bind operator
8.5.3 Deferring asynchronous computation enables composition
8.5.4 Retry if something goes wrong
8.5.5 Handling errors in asynchronous operations
8.5.6 Asynchronous parallel processing of the historical stock market
8.5.7 Asynchronous stock market parallel processing as tasks complete
Summary