The thread pool has been enhanced with great new features. The new features can be accessed from the Task API. The Task API can be used similar to the Thread class and offers some advanced features. For the tasks to queue up, the pool now not only includes a global queue but also a local queue for every thread in the pool. This can enhance performance because of data cached in the CPU.
With the new API, other than starting tasks some more features: tasks can be started in a parent/child relationship, it is possible to suspend/continue/wait/cancel tasks, and get results from the task (using the Future class). This class might be renamed to Task as well (in the future).
Tasks are well integrated into Visual Studio 2010. For debugging tasks new windows Parallel Tasks and Parallel Stacks are available.
A common pattern is using threads in a loop to perform some actions on a list of items. The Parallel class gives an implementation of this pattern. Parallel.ForEach offers several overloads to do several actions in parallel with the thread pool.
Declarative data parallelism allows LINQ queries to run in parallel. This feature is for LINQ to objects thus collections that implement IEnumerable. All that needs to be done is to invoke the AsParallel method that does nothing more than casting the IEnumerale interface to IParallelEnumerable. The class ParallelEnumerable then offers extension methods for the IParallelEnumerable interface to call the LINQ operators using threads from the pool.