code: private void doInterruptAllWaitingThreads() {
      	//Interrupt all the threads
      	for (int i=0; i<nThreads; i++) {
      		threads[i].interrupt();
      	}
      	
      	synchronized(lock) {
      		lock.notify();
      	}
      }
docs: /*
  Clean-up the worker thread when all the tasks are done