code: public void awaitTermination() throws InterruptedException {
        lock.lock();
        try {
           while (!isDone) {
              done.await();
           }
        } finally {
           isDone = false;
           lock.unlock();
        }
     }
docs: Awaits termination of the threads
  
  @throws InterruptedException The executor was interrupted