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?
Pingback: Tweets that mention A Web Technologist Adventure » Blog Archive » Using TaskFactory to manage easily dependencies between threads. -- Topsy.com