Friday, 28 October 2011

TPL DataFlow C#

The new DataFlow library can build up pipelines for our data to flow through.

Perhaps you have a series of processes a file must go through in a defined sequence:

  1. Encrypt
  2. Compress
  3. FTP
  4. Archive

DataFlow allows for easy manipulation of concurrency, asynchronicity and build up of our data flow pipelines.

In this simple example a number is posted into the pipeline, to be transformed by doubling it.  It can then be passed to the ActionBlock for output to screen.

You can download the TPL DataFlow CTP from Microsoft:

No comments:

Post a Comment