Gary J wrote:
> You're absolutely correct.
>
> When I initially saw the join() method I thought my problems were over but I
> discovered a possible problem with that approach.
>
> The problem is that in traversing a tree threads are created and finished
> the time which means the contents of the Collection would constantly change.
> The main method would have to constantly recheck and join to all the threads
> in the list on every pass until there were no more threads to join to. At
> that point I'm really doing the same thing as checking a counter but with
> more work 
>
> Of course I could be mistaken and haven't tried this one out yet. There's
> probably a flaw in my logic.
Apply the join() technique in each thread that starts threads. Each
thread will have its own collection of the Threads it started, which
will not change once that thread stops creating new Threads and starts
join()ing the ones it created.
John Bollinger