The Taskbased Asynchronous Pattern Stephen Toub, Microsoft February 2012 Contents Overview......................................................................................................................................2 The Task-based Asynchronous Pattern Defined..........................................................................2 Naming, Parameters, and Return Types...................................................................................2 Behavior...................................................................................................................................3 Optional: Cancellation..............................................................................................................5 Optional: Progress Reporting...................................................................................................6 Choosing Which Overloads to Provide.....................................................................................7 Implementing the Task-based Asynchronous Pattern...................................................................8 Method Generation...................................................................................................................8 Workloads................................................................................................................................9 Consuming the Task-based Asynchronous Pattern....................................................................