public void shutdown(){
  final ReentrantLock mainLock=this.mainLock;
  mainLock.lock();
  try {
    checkShutdownAccess();
    advanceRunState(SHUTDOWN);
    interruptIdleWorkers();
    onShutdown2();
  }
  finally {
    mainLock.unlock();
  }
  tryTerminate2();
}

public void shutdown ( ) { final ReentrantLock mainLock = this . mainLock ; mainLock . lock ( ) ; try { checkShutdownAccess ( ) ; advanceRunState ( SHUTDOWN ) ; interruptIdleWorkers ( ) ; onShutdown2 ( ) ; } finally { mainLock . unlock ( ) ; } tryTerminate2 ( ) ; }
initiates an orderly shutdown in which previously submitted tasks are executed , but no new tasks will be accepted . invocation has no additional effect if already shut down .
