public void stopAllThreads ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stopAllThreads" ) ; synchronized ( this ) { Iterator iterator = ( ( ArrayList ) _threadCache . clone ( ) ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { StoppableThread thread = ( StoppableThread ) iterator . next ( ) ; if ( tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Attempting to stop thread " + thread ) ; // Stop the thread thread . stopThread ( this ) ; // Remove from the iterator iterator . remove ( ) ; // Remove from the cache _threadCache . remove ( thread ) ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stopAllThreads" ) ; }
Stops all the stoppable threads that haven t already been stopped