public void shutdownNow(){
  if (poolRunning()) {
    try {
      Thread.sleep(4000);
    }
 catch (    Exception e) {
    }
  }
  if (imageDownloadExecutor != null && !imageDownloadExecutor.isTerminated()) {
    imageDownloadExecutor.shutdownNow();
  }
  if (unnamedTaskExecutor != null && !unnamedTaskExecutor.isTerminated()) {
    unnamedTaskExecutor.shutdownNow();
  }
  if (downloadExecutor != null && !downloadExecutor.isTerminated()) {
    downloadExecutor.shutdownNow();
  }
  if (mainTaskExecutor != null && !mainTaskExecutor.isTerminated()) {
    mainTaskExecutor.shutdownNow();
  }
  if (scheduler != null && !scheduler.isTerminated()) {
    scheduler.shutdownNow();
  }
}

public void shutdownNow ( ) { if ( poolRunning ( ) ) { try { Thread . sleep ( 4000 ) ; } catch ( Exception e ) { } } if ( imageDownloadExecutor != null && ! imageDownloadExecutor . isTerminated ( ) ) { imageDownloadExecutor . shutdownNow ( ) ; } if ( unnamedTaskExecutor != null && ! unnamedTaskExecutor . isTerminated ( ) ) { unnamedTaskExecutor . shutdownNow ( ) ; } if ( downloadExecutor != null && ! downloadExecutor . isTerminated ( ) ) { downloadExecutor . shutdownNow ( ) ; } if ( mainTaskExecutor != null && ! mainTaskExecutor . isTerminated ( ) ) { mainTaskExecutor . shutdownNow ( ) ; } if ( scheduler != null && ! scheduler . isTerminated ( ) ) { scheduler . shutdownNow ( ) ; } }
hard shutdown of all tasks after a max of 4 secs waiting
