Multithreading made easy with .NET 4.0 Parallel ExtensionsAdd to My Brief

Jason Watmore | 15/08/2011

With the growing popularity of multi-core processors, there is an increasing expectation that applications are able to utilize this power. 

Up until recently, the task of writing a robust multithreaded application was daunting to say the least. But with the addition of Parallel Extensions in .NET 4.0, it's as simple as changing a couple of lines of code.

For example, given a regular c# foreach loop:

The equivalent parallel loop is:

Parallel for each loops are just one of the many features of the Parallel Extensions library. For a complete reference refer to the book "Parallel Programming with Microsoft .NET", which you can access online for free at http://msdn.microsoft.com/en-us/library/ff963553.aspx.

tags: Web Development

Interested in learning more?

Wiliam is a leading supplier of web solutions and can provide expert advice to assist your business or organisation online.

Make enquiry   Request quotation

Comments

Share this page

Print this page Email this page to a friend Bookmark and Share

No Brief added yet.

My Brief results-driven approach emphasises a commitment to our clients needs through strategic analysis and best-practice.

Add to My Brief

Click on this icon to save item into My Brief. Retrieve, email and print

Drag & Drop

Drag & drop any iten with this icon into My Brief. Retrieve, email and print

Search Blogs