In this chapter, we cover the multithreading APIs and constructs aimed at leveraging multicore processors:
Parallel LINQ or PLINQ
The task parallelism constructs
The concurrent collections
These are new to Framework 4.0 and are collectively known (loosely)
as PFX (Parallel Framework). The
Parallel class together with the task
parallelism constructs is called the Task Parallel
Library or TPL.
Framework 4.0 also adds a number of lower-level threading constructs that are aimed equally at traditional multithreading. We covered these in the previous chapter:
You’ll need to be comfortable with the fundamentals in Chapter 21 before reading this chapter—particularly locking and thread safety.
In recent times, CPU clock speeds have stagnated and manufacturers have shifted their focus to increasing core counts. This is problematic for us as programmers because our standard single-threaded code will not automatically run faster as a result of those extra cores.