public void shutdownAndWaitUntilDone(){
  shutdown();
  while (true) {
synchronized (endSignal) {
      try {
        if ((combinedState.get() & 0x7FFFFFFFFFFFFFFFL) == 0)         break;
        endSignal.wait(100);
      }
 catch (      InterruptedException e) {
      }
    }
  }
}

public void shutdownAndWaitUntilDone ( ) { shutdown ( ) ; while ( true ) { synchronized ( endSignal ) { try { if ( ( combinedState . get ( ) & 0x7FFFFFFFFFFFFFFFL ) == 0 ) break ; endSignal . wait ( 100 ) ; } catch ( InterruptedException e ) { } } } }
shuts down the executor and blocks until all tasks have completed execution
