.NET Parallel Programming

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

Parallel Computing Presentations in Michigan, Ohio, Kentucky, and Tennessee

In a week, I’m going to be traveling through Michigan, Ohio, Kentucky, and Tennessee, speaking about parallel computing, Visual Studio 2010, and .NET 4, primarily at corporations during the day and at user groups in the evenings.If you’re in the area and interested, please do attend, and I look forward to meeting you!  A list ...

Choosing Between the Task Parallel Library and the ThreadPool

If you’ve been following the development of the Task Parallel Library (TPL), or if you’re an avid reader of this blog, you’re likely aware that the default scheduler in TPL is based on the new and improved ThreadPool in .NET 4.  In light of this, though, quite a few folks have asked whether there are any advantages (...

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 ...

Parallel Extensions and I/O

In this post, we’ll investigate some ways that Parallel Extensions can be used to introduce parallelism and asynchrony to I/O scenarios. Here’s a simple scenario.  I want to retrieve data from a number of web resources. static string[] Resources = new string[] {     "http://www.microsoft.com", "http://www.msdn.com", &...

Asynchronous programming in .NET survey

Update:  The survey is now closed.  Thanks to all that participated! We’ve heard our customers’ frustrations with asynchronous programming and their call for improved support.  We are hoping to better understand why and how you and your customers use asynchronous programming in .NET and how the support we ...