code: public synchronized int cancelByTag(String tagToCancel) {
          int i = 0;
          if (taskList.containsKey(tagToCancel)) {
              removeDoneTasks();
  
              for (Future<BlurWorker.Result> future : taskList.get(tagToCancel)) {
                  BuilderUtil.logVerbose(Dali.getConfig().logTag, "Canceling task with tag " + tagToCancel, Dali.getConfig().debugMode);
                  future.cancel(true);
                  i++;
              }
  
              //remove all canceled tasks
              Iterator<Future<BlurWorker.Result>> iter = taskList.get(tagToCancel).iterator();
              while (iter.hasNext()) {
                  if (iter.next().isCancelled()) {
                      iter.remove();
                  }
              }
          }
          return i;
      }
docs: Cancel all task with this tag and returns the canceled task count
  
  @param tagToCancel
  @return