A new home

I’ve made the move to WordPress!

You should be automatically redirected in 5 seconds. Please visit World Wide Code on Wordpress

Hope to see you there!

Saturday, October 8, 2011

The Past, Present and Future of Parallelizing .NET Applications


In the MSDN magazine article, Stephen Toub explains the use of parallel tasks like PLINQ in .Net 4.0. I recommend reading this article to get some insights on parallel operations whether you use them or not in your applications.
With the Parallel class, you can parallelize it simply as follows:
  1. Parallel.For(0, N, i => {
  2.   … // Process i here
  3. });
Here, the developer is still responsible for ensuring each iteration of the loop is in fact independent, but beyond that, the Parallel.For construct handles all aspects of this loop’s parallelization.

Stephen Toub is a principal architect on the Parallel Computing Platform team at Microsoft.

No comments:

Post a Comment