public void shutdown(){
  if (VERBOSE)   Util.verbose("Shutdown");
  disable();
  discardJobs(null);
  Thread thread=this.processingThread;
  try {
    if (thread != null) {
synchronized (this) {
        this.processingThread=null;
        notifyAll();
      }
      thread.join();
    }
    Job job=this.progressJob;
    if (job != null) {
      job.cancel();
      job.join();
    }
  }
 catch (  InterruptedException e) {
  }
}

public void shutdown ( ) { if ( VERBOSE ) Util . verbose ( "Shutdown" ) ; disable ( ) ; discardJobs ( null ) ; Thread thread = this . processingThread ; try { if ( thread != null ) { synchronized ( this ) { this . processingThread = null ; notifyAll ( ) ; } thread . join ( ) ; } Job job = this . progressJob ; if ( job != null ) { job . cancel ( ) ; job . join ( ) ; } } catch ( InterruptedException e ) { } }
stop background processing , and wait until the current job is completed before returning
