public final void destroy(){
  stopIdleThreads();
  try {
    Thread.sleep(500);
  }
 catch (  InterruptedException e) {
  }
synchronized (allThreadList) {
    int numThreads=allThreadList.length;
    int i=0;
    while (i < numThreads) {
      IPSThread ipsThread=allThreadList[i];
      allThreadList[i++]=null;
      if (ipsThread.isAlive()) {
        ipsThread.stop();
      }
    }
  }
}

public final void destroy ( ) { stopIdleThreads ( ) ; try { Thread . sleep ( 500 ) ; } catch ( InterruptedException e ) { } synchronized ( allThreadList ) { int numThreads = allThreadList . length ; int i = 0 ; while ( i < numThreads ) { IPSThread ipsThread = allThreadList [ i ] ; allThreadList [ i ++ ] = null ; if ( ipsThread . isAlive ( ) ) { ipsThread . stop ( ) ; } } } }
destroys the thread pool . this stops all the threads , active and idle , in the pool and releases all resources .
