Chapter 3. Parallel Basics
In this chapter, we’ll cover patterns for parallel programming. Parallel programming is used to split up CPU-bound pieces of work and divide them among multiple threads. These parallel processing recipes only consider CPU-bound work. If you have naturally asynchronous operations (such as I/O-bound work) that you wish to execute in parallel, then see Chapter 2, and Recipe 2.4 in particular.
The parallel processing abstractions covered in this chapter are part of the Task Parallel Library (TPL). This is built in to the .NET framework but is not available on all platforms (see Table 3-1):
Platform | Parallel support |
.NET 4.5 | |
.NET 4.0 | |
Mono iOS/Droid | |
Windows Store | |
Windows Phone Apps 8.1 | |
Windows Phone SL 8.0 | |
Windows Phone SL 7.1 | |
Silverlight 5 |
3.1. Parallel ...
Get Concurrency in C# Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.