code: public synchronized int numActiveSubTasks() {
          int c = 0;
          for (Future<?> f : subTasks) {
              if (!f.isDone() && !f.isCancelled()) {
                  c++;
              }
          }
          return c;
      }
docs: Count the number of active sub tasks.