O'Reilly logo

Real World .NET 4, C#, and Silverlight®: Indispensible Experiences from 15 MVPs by Daron Yöndem, Christian Weyer, Christian Nagel, Scott Millett, Jeremy Likness, Vishwas Lele, Jeffrey Juday, Caleb Jenkins, Kevin Grossnicklaus, Alex Golesh, David Giard, Gill Cleeren, György Balássy, Dominick Baier, Bill Evjen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11

Applied .NET Task Parallel Library

by Jeffrey Juday

It has become a multicore world, and parallel programming must be embraced for a developer to capitalize on all the burgeoning multicore potential. Embracing parallel programming in .NET means a developer must learn about the Task Parallel Library (TPL).

Although .NET has always had features often associated with concurrency and parallel algorithms such as threading and mutexes, the goal of the aTPL is to make concurrency and parallel construction even easier. Borrowing from academia, commercial best practices, and incorporating some unique innovations, the TPL has been assembled to simplify .NET parallel programming. The TPL introduces some new constructs and sports an improved ThreadPooling mechanism.

Parallel programming is often divided into data parallelism and task parallelism. Data parallelism in .NET is encapsulated into parallel loops and parallel LINQ. Underpinning parallel loops and parallel LINQ are all the TPL task parallelism classes. Although a developer could leverage parallel loops and parallel LINQ without delving into all TPL classes, diverging from some simple scenarios requires some deeper understanding. A deeper data parallelism understanding actually entails learning how to work with a core set of TPL classes.

That same reasoning goes for learning task parallelism. A developer can leverage task parallelism with a few TPL classes. Again, though, diverging from well-defined scenarios requires understanding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required