public boolean cancelTask(Task task){
  for (  ThreadRunnable threadRunnable : runableMap.keySet()) {
    if (threadRunnable.task == task) {
      Future future=runableMap.remove(threadRunnable);
      if (future != null) {
        future.cancel(true);
      }
      return true;
    }
  }
  return false;
}

public boolean cancelTask ( Task task ) { for ( ThreadRunnable threadRunnable : runableMap . keySet ( ) ) { if ( threadRunnable . task == task ) { Future future = runableMap . remove ( threadRunnable ) ; if ( future != null ) { future . cancel ( true ) ; } return true ; } } return false ; }
cancel a single task
