protected void waitForShutdownSignal() throws InterruptedException {
  if (mutexWaiting == null) {
    mutexWaiting=new Object();
  }
  try {
synchronized (mutexWaiting) {
      mutexWaiting.wait();
    }
  }
 catch (  InterruptedException e) {
    if (!shutdown) {
      throw e;
    }
  }
}

protected void waitForShutdownSignal ( ) throws InterruptedException { if ( mutexWaiting == null ) { mutexWaiting = new Object ( ) ; } try { synchronized ( mutexWaiting ) { mutexWaiting . wait ( ) ; } } catch ( InterruptedException e ) { if ( ! shutdown ) { throw e ; } } }
causes the current thread to block until signalshutdown is called . this is used by workerthreads which are not actively polling the shutdown field .
