private void signalAll(){
  lock.lock();
  try {
    isDone=true;
    done.signalAll();
  }
  finally {
    lock.unlock();
  }
}

private void signalAll ( ) { lock . lock ( ) ; try { isDone = true ; done . signalAll ( ) ; } finally { lock . unlock ( ) ; } }
this private method allows the threadpoolexecutor to notify all interested parties that all tasks given to the execute method have run to conclusion .
