O'Reilly logo

Visual Studio® 2010 All-in-One For Dummies® by Rick Leinecker

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

Chapter 10. Parallel Programming

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.

Introducing the .NET Task Parallel Library

This separation of tasks onto different processors ...

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