Wednesday 26 September 2012

PFX (Parallel Extensions) built on System.Threading.Tasks

What is PFX? (I heard about it on Channel 9).

PFX stands for Parallel Extensions for the .NET framework (released in .NET 4.0) and is something of increasing importance, judging from the multiple references to PFX on channel9.msdn.com. This post will be a primer to PFX - getting you up-to-speed with the basic terminology and concepts.

Who developed PFX?

Both Microsoft Research and the CLR team were involved in the development of PFX.

Two Parts to PFX and their Relationship

First is Parallel LINQ (PLINQ) and second is Task Parallel Library (TPL). PLINQ uses TPL for execution. The other technical term is CDS which stands for coordination data structures - used to synchronise and co-ordinate execution of concurrent tasks.

Example

using System.Threading.Tasks;
Parallel.ForEach(myListOfStrings, s => Console.WriteLine(s));

Data Structures for Parallel Programming

More can be found here. Ex: System.Collections.Concurrent.ConcurrrentDictionary<Key,Value>

No comments: