[concurrency-interest] Fork/Join framework with acyclic task graph

Mark Thornton mthornton at optrak.co.uk
Wed Dec 5 10:08:43 EST 2007

Doug Lea wrote:
>> Some of my tasks have common subtasks. In these cases I would like tasks
>> to execute subtasks which have not already been submitted, but merely
>> wait on those which have already been submitted by other tasks. For
>> example task A has sub tasks C, D, while task B has subtasks D,E.
>> Does the fork/join framework permit this type of use?
> If you mean that A does: C.join(); D.join(); and
> similarly for B, then, sure, this is fine.
> So long as the waits are acyclic, the underlying
> helping-join mechanics suffice. Non-block-structured
> cases might (or might not) use more internal
> stack/work-queue space
> than other cases, but this rarely an issue.
> -Doug
Thanks, that is exactly what I was hoping. Most of the jobs will be 
block structured, so a small amount of overhead in the other cases is 
not an issue.

Mark Thornton

More information about the Concurrency-interest mailing list