[concurrency-interest] Handling DAGs with JSR166

Niko Matsakis niko at alum.mit.edu
Tue Nov 16 07:20:45 EST 2010

> The provided Recursive{Action,Task} subclasses of ForkJoinTask deal
> with strict nesting, but you can use others for arbitrary
> DAGS. Two such classes (BinaryAsyncAction and LinkedAsyncAction),
> along with a few usage examples can be found in our CVS at
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/test/loops/ 
So, I did a bit more reading into the code and in particular looked at 
those examples actions you gave.  Am I correct that 
{Binary,Linked}AsyncAction still don't allow "lateral" joins? By a 
lateral join, I mean a case like I outlined previously, where one node 
joins its siblings in the "fork tree" (i.e., the tree formed by 
considering which task forked every other task).  I believe this is true 
because the join() behavior seems to be fixed in ForkJoinTask and the 
ForkJoinWorkerThread using a combination of final / package-only 
methods.  I guess that lateral joins would best be accomplished using 
the point-to-point synchronization capabilities of Phasers or some other 



More information about the Concurrency-interest mailing list