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();
}

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 ( ) ; }
a new method that interrupts the worker thread . call this method to force the worker to stop what it ' s doing .
