code: public void waitAllThreadComplete(int waitInMillis) {
  		for (int i=0; i<pool.length; i++) {
  			if (pool[i] != null && pool[i].isAlive()) {
  				try {
  					pool[i].join(waitInMillis);
  				} catch (InterruptedException e) {
  				}
  			}
  		}
  	}
docs: Waits until all threads finish its tasks (at most some time for each).
  <p>
  If not completed yet, do not wait. Each thread should kill itself.
  @param waitInMillis the number of milliseconds to wait for the threads