In addition to improving the performance of the Task Parallel Library (TPL) and PLINQ, a bunch of new classes that compliment the TPL, and that can be used for general multithreading work, are included too. These include things such as a spinlock class, that includes builtin support for the sleep/ retry loop when the lock isn’t available; and the ConcurrentQueue and ConcurrentStack classes. These latter ones provide builtin support for multiple threads reading and writing to the collections simulataneously, and remove the need to write semaphore-based wrappers around the previous Queue and Stack classes.
! Warning: this post hasn't been updated in over three years and so may contain out of date information.Last week, Microsoft released a new Community Technology Preview (CTP) of the .NET Task Parallel Library. The new release has a brand new scheduler that repleaces the pretty crude protottype scheduler found in the December 2007 CTP. According to the help file that accompanies the release, the new scheduler “… uses cooperative scheduling and work-stealing to achieve fast, efficient scheduling and maximum CPU utilization”.