Using TaskFactory to manage easily dependencies between threads.

By | June 21, 2010

With the new TaskFactory class from .Net 4.0 it has become incredibly easy to manage dependencies between multiple tasks.
In below code sample, the TaskFactory receive 6 tasks to execute. Additional logic is added as:
– Task A will only be run when Task B and C are completed.
– Task C will only be run when Task F, E or D is completed.

If you are confused with the ‘=>’ have a look at lambda expression.

Isn’t that beautiful?

 
1 Kudos
Don't
move!

One thought on “Using TaskFactory to manage easily dependencies between threads.

  1. Pingback: Tweets that mention A Web Technologist Adventure » Blog Archive » Using TaskFactory to manage easily dependencies between threads. -- Topsy.com

Thoughts?