tags:

views:

80

answers:

1

Hi there,

do you have any advice on how i might visualise a Task Tree? I will be running a large set of long running tasks which each have some child tasks, i want to visualise the running of the execution to the user ideally in a tree / DAG. If possible i would like to use the new Task Parallel Library

My first thought is to subclass Task and Name and description feilds, then to try to see if Task has the properties to get a list of child tasks. I could then use GraphSharp.codeplex.com or something similar (any preference?) to visualise the tree.

Any ideas/ Advice?

Thanks

David

A: 

Personally, I would avoid subclassing Task (or Task<T>). Doing so will cause TaskFactory to not behave properly, but also potentially lead to a loss of flexibility or a very high amount of required implementation to cover all features.

I would, instead, make a class that schedules and starts the task for you. This class could be used to generate all of your tasks (even just returning the Task using a factory method). Internally, it could easily track your graphing information, use continuations on the constructed tasks to track completion or failure events, etc.

Reed Copsey