.NET Parallel Programming

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

Reactive Extensions and Parallel Extensions

It’s awesome to see the Reactive Extensions to .NET (Rx) live on the DevLabs site.  If you haven’t checked out this exciting project, we urge you to do so.  Not only is it cool and useful technology, but the download includes a back ported (and unsupported) release of Parallel Extensions for the .NET Framework 3.5 in the ...

What’s new in Beta 2 for the Task Parallel Library? (Part 3/3)

Related posts: What's new in Beta 2 for the Task Parallel Library? (1/3) What's new in Beta 2 for the Task Parallel Library? (2/3) Last time, we covered Tasks being detached by default and some refactorings in our multiple-Task continuation APIs.  The final post of this series will discuss Nested Tasks and Unwrap, a Parallel namespace ...

What’s new in Beta 2 for the Task Parallel Library? (Part 2/3)

Related posts: Last week, we talked about how TPL adopted a new, better cancellation model.  Today, we’ll cover a change that makes Tasks Detached by Default, some ContinueWhenAll/Any Refactoring, and the handy UnobservedTaskException event.Tasks are Detached by DefaultIn Beta 2, we have changed an important default.  Tasks ...

The meaning of TaskStatus

Every System.Threading.Tasks.Task instance goes through a lifecycle, and it only makes this journey once.  To provide insight into where in that lifecycle a given Task is, the Task class provides an instance Status property.  That property returns a value from the TaskStatus enumeration that reflects the current point in the ...

Implementing Parallel While with Parallel.ForEach

The Parallel class in .NET 4 includes methods that implement three parallel constructs: parallelized for loops (Parallel.For), parallelized foreach loops (Parallel.ForEach), and parallelized statement regions (Parallel.Invoke).  One of the interesting things about Parallel.Invoke is that, in some cases and at least in the current ...