I am looking for some guidance from some of the graph and thread experts out there.

I have a graph that I want to execute a breadth-first search (BFS) on.  When each node is visited, it spawns a thread to execute some work.  I must not execute a child node before the parent execution is completed, but I also want to maximize concurrency. In other words, I don't want to "serialize" the BFS to force proper execution ordering.

Are there any ideas of how to accomplish this efficiently?

James
---
James C. Sutherland
Assistant Professor, Chemical Engineering
The University of Utah
50 S. Central Campus Dr, 3290 MEB
Salt Lake City, UT 84112-9203
 
(801) 585-1246 
http://www.che.utah.edu/~sutherland