.NET Parallel Programming

All about Async/Await, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more…

Using Tasks to implement the APM Pattern

Several times recently, folks have asked how to use tasks to implement the APM pattern, otherwise known as the Asynchronous Programming Model pattern, or the IAsyncResult pattern, or the Begin/End pattern.  While moving forward we encourage folks to use a Task-based pattern for exposing asynchronous operation, the APM pattern has been the...

TPL Dataflow CTP Refresh

Today, we released a new CTP of TPL Dataflow, otherwise known as System.Threading.Tasks.Dataflow.dll.  You can download this as part of the Microsoft Visual Studio Async CTP, which will also install the new C#/Visual Basic support for writing asynchronous methods, or you can install the DLL itself through the installer available on the ...

TPL Dataflow on TC Labs

After releasing a CTP of TPL Dataflow as part of the Async CTP, we had multiple requests for a standalone download for just the System.Threading.Tasks.Dataflow.dll.  Thanks to everyone who asked for this, and as of this morning, such an installer for an updated version of the preview is now available!  This is part of a ...

AsyncLazy

A question I’ve seen come up from time to time is “Why doesn’t Lazy<T> support asynchronous initialization?”  It’s a fair question.  After all, if you’re using Lazy<T> because you have an expensive resource you want to delay the creation of until it’s absolutely needed, it’s...

await anything;

One of the very cool things about the new await keyword in C# and Visual Basic is that it’s pattern based.  It works great with Task and Task<TResult>, and awaiting those two types will represent the vast majority of uses, but they’re by no means the only types that can be awaited.  The languages support awaiting ...

Language support for Tasks!

Today is a very exciting day for Parallel Extensions, and indeed for all developers using C# and Visual Basic and who are interested in writing more responsive and scalable applications. At the PDC this morning, Anders Hejlsberg just announced the Visual Studio Async CTP, which you can download immediately from the landing page at https://msdn...