In This Chapter
Discovering the .NET Task Parallel Library (TPL)
Executing tasks in parallel in unmanaged C++ with the Parallel Patterns Library (PPL)
Dividing up the work with Parallel Language Integrated Query (PLINQ)
Most personal and notebook computers today come equipped with multiple processors or multicore processors that can execute instructions in parallel on each processor or processor core. In fact, personal computers containing processors with four cores are commonplace today, allowing the computer to execute four sets of instructions simultaneously. Finally, with the release of Visual Studio 2010, programming libraries have become available that allow you to break down a process or algorithm into separate tasks that can be executed on different processors or processor cores.
In this chapter, you explore two parallel programming libraries that are new in .NET 4. The first is the Task Parallel Library (TPL), which allows you to perform the same operation in parallel on items in a collection or array as well as execute multiple tasks in parallel. You also become familiar with the Parallel Language Integrated Query (PLINQ), which allows you to execute queries in parallel on a given data collection. For the developer of unmanaged C++ applications, a new Concurrency Runtime library provides a Parallel Patterns Library (PPL) that is analogous to the TPL in .NET.
This separation of tasks onto different processors ...