public void cancelAll(boolean interrupt) {
    for (Future<V> future : tasks) {
      future.cancel(interrupt);
    }
  }
A completion service, close to the one available in the JDK 1.7 However, this ones keeps the list
of the future, and allows to cancel them all. This means as well that it can be used for a small
set of tasks only. <br>
Implementation is not Thread safe.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/BoundedCompletionService.java