23 May 2013
TAP Using Tasks and Async/Await
This week's video converts a simple synchronous method to async following the Task-based Asynchronous Pattern (TAP) using two different implementations.
- The first implementation uses Tasks, continuations and Task.Delay
- Then second uses the new async and await keywords, resulting in code that is very similar to the synchronous version. It also uses the Task.WhenAll method to asynchronously wait on multiple tasks.
For further reading, see:
- Async/Await FAQ and other async articles on the Parallel Programming with .NET Blog
- Easier Asynchronous Programming by Eric Lippert and the async articles on his old blog.
- Asynchronous Programming with Async and Await (MSDN)
Posted by Scott Fleischman at May 23, 2013 01:40 PM