public boolean shutdown(long awaitTimeMillis){
  shutdown=true;
  for (  GridWorker w : workers)   w.cancel();
  while (awaitTimeMillis > 0 && !workers.isEmpty()) {
    try {
      Thread.sleep(100);
      awaitTimeMillis-=100;
    }
 catch (    InterruptedException e) {
      break;
    }
  }
  return workers.isEmpty();
}

public boolean shutdown ( long awaitTimeMillis ) { shutdown = true ; for ( GridWorker w : workers ) w . cancel ( ) ; while ( awaitTimeMillis > 0 && ! workers . isEmpty ( ) ) { try { Thread . sleep ( 100 ) ; awaitTimeMillis -= 100 ; } catch ( InterruptedException e ) { break ; } } return workers . isEmpty ( ) ; }
shuts down this executor service .
