Contents
Chapter 1: An Introduction to Asynchronous Programming
What Is Asynchronous Programming?
Chapter 2: The Evolution of the .NET Asynchronous API
Asynchrony in the World of .NET 1.0
Logical and Physical Separation
Event-Based Asynchronous Pattern
Thread Pool Heuristics in .NET 3.5
Remodeling the Thread Pool Queue
Thread Pool Heuristics in .NET 4.0
Chaining Tasks (Continuations)
Chapter 4: Basic Thread Safety
Correctness Is Not the Only Problem
Monitor: The Workhorse of .NET Synchronization
Timing Out of Monitor Acquisition
Raising the Starting Gate: ManualResetEventSlim
CountdownEvent: Simplifying Fork and Join
Barrier: Rendezvous-Based Synchronization
Crossing the AppDomain Boundary with WaitHandle
WaitHandle—The Kernel Synchronization Abstraction
Working with Multiple WaitHandles
Integrating Standard Primitives and Kernel Objects
Synchronization Is Not the Only Answer
Chapter 5: Concurrent Data Structures
ConcurrentQueue<T> and ConcurrentStack<T>
Event-Based Asynchronous Pattern (EAP)
Windows Presentation Foundation (WPF)
Executing Work Through the Dispatcher
Executing Work Through the Dispatcher
Making Asynchronous Programming Simpler
What Do async and await Actually Do?
Returning Values from async Methods
Should You Always Continue on the UI Thread?
Worked Example: Creating a Foreground Task
Unit Testing and Stubbing Asynchronous Methods
Building Task-Based Combinators
Alternative WhenAll, WhenAllOrFail
A Synchronous WebForms Implementation
Asynchronous Pages in WebForms 4.0
Asynchronous Pages in WebForms 4.5
Asynchronous MVC Processing in .NET 4.0
Asynchronous MVC Processing in .NET 4.5
Asynchronous Web API Operations in .NET 4.0
Asynchronous Web API Operations in .NET 4.5
Windows Communication Foundation
Asynchronous WCF Services in .NET 4.0
Asynchronous WCF Services in .NET 4.5
Producer and Consumer Revisited
Chapter 11: Parallel Programming
What Is Driving the Need for Parallelism?
Coarse- and Fine-Grained Parallelism
Task and Data-Based Parallelism
Is It Worth Trying to Parallelize Everything?
Moving from Sequential LINQ to PLINQ
Influencing and Configuring the Query
ConcurrentExclusiveSchedulerPair
Implementing GetScheduledTasks
Implementing TryExecuteTaskInline
Implementing a Custom Scheduler
Creating a Basic Implementation
Unit Testing Custom Schedulers
Controlling Execution Order with Synchronization Primitives
Adding Members to the Scheduler to Provide Insight
Deriving a Testable Class from the Scheduler
Chapter 13: Debugging Async with Visual Studio
The Limitations of Using Visual Studio for Debugging
Multithreaded Visual Studio Debugging Basics
Locals, Autos, and Watch Windows
The Parallel Tasks / Tasks Window
18.118.144.248