net.sf.jso.util
Class ThreadsJoiner

java.lang.Object
  extended bynet.sf.jso.util.ThreadsJoiner

public class ThreadsJoiner
extends java.lang.Object

An object that allows a collective join of joiner threads.


Constructor Summary
ThreadsJoiner()
           
 
Method Summary
 void add(JoinerThread thread)
          Adds a thread to joiner.
 void join()
          Waits for all threads to die.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadsJoiner

public ThreadsJoiner()
Method Detail

add

public void add(JoinerThread thread)
Adds a thread to joiner.

Parameters:
thread - One of the threads to be part of the join.

join

public void join()
Waits for all threads to die. All threads should be started and added before this method is called.