question: public void interrupt ( ) { final Thread t = threadVar . get ( ) ; if ( t != null ) { t . interrupt ( ) ; while ( t . isAlive ( ) ) { try { Thread . sleep ( 20 ) ; } catch ( final InterruptedException e ) { LogWriter . writeLog ( "Exception: " + e . getMessage ( ) ) ; } } } threadVar . clear ( ) ; }
target:  A new method that interrupts the worker thread.  Call this method to force the worker to stop what it's doing.