public synchronized void close(){
  if (isAlive) {
    isAlive=false;
    taskQueue.clear();
    interrupt();
  }
}

public synchronized void close ( ) { if ( isAlive ) { isAlive = false ; taskQueue . clear ( ) ; interrupt ( ) ; } }
closes this threadpool and returns immediately . all threads are stopped , and any waiting tasks are not executed . once a threadpool is closed , no more tasks can be run on this threadpool .
