Task-based Asynchronous Pattern (TAP) for the .NET Framework

The Task-based Asynchronous Pattern (TAP) is a new pattern for asynchrony in the .NET Framework. It's based on the Task and Task{TResult} types in the System.Threading.Tasks namespace, which're used to represent arbitrary asynchronous operations."For the Microsoft Visual Studio Async CTP, some instance methods that would otherwise live on a particular type are instead defined as […]

The Task-based Asynchronous Pattern (TAP) is a new pattern for asynchrony in the .NET Framework. It's based on the Task and Task{TResult} types in the System.Threading.Tasks namespace, which're used to represent arbitrary asynchronous operations.

"For the Microsoft Visual Studio Async CTP, some instance methods that would otherwise live on a particular type are instead defined as extension methods. Similarly, some static methods that would otherwise live on a particular type TypeName are instead defined as static methods on a temporary type TypeNameEx," Microsoft's Stephen Toub explained.

This document ignores those differences and refers to the relevant members at their intended location, e.g. the WhenAll method is referred to as Task.WhenAll rather than TaskEx.WhenAll, even though it exists on the temporary TaskEx class in the Async CTP.

Download: Task-based Asynchronous Pattern