I have a list of n tasks that I want to execute in parallel, asyncronously.
Each of the parallel running tasks can have 1 or more nested tasks.
I also need to wait and analyse the return result of each Task. The entire operation is successful only if all tasks execute successfuly (e.g. they return "true").
Effectively, this is a transactional operation where I need to wait for many tasks to complete sucessfully.
The problem is that each task may take 1-3 hours to complete (some tasks may take only minutes, while others take hours) The whole operation might take a full work day.
My questions:
- Is this approach feasable and doable using Task Parallel Library?
- Also, what happens if one of the tasks times out and fails to report back to the mother task?
- Can the library handle such scenarios where tasks are not only nested, but alos take a very long time to complete?
EDIT: I found this blog post about cancelling tasks, especially long running ones. Maybe it useful to others, too.