code: final void helpQuiescePool(WorkQueue w) {
          ForkJoinTask<?> ps = w.currentSteal; // save context
          int wc = w.config;
          for (boolean active = true;;) {
              long c; WorkQueue q; ForkJoinTask<?> t;
              if (wc >= 0 && (t = w.pop()) != null) { // run locals if LIFO
                  (w.currentSteal = t).doExec();
                  w.currentSteal = ps;
              }
              else if ((q = findNonEmptyStealQueue()) != null) {
                  if (!active) {      // re-establish active count
                      active = true;
                      U.getAndAddLong(this, CTL, AC_UNIT);
                  }
                  if ((t = q.pollAt(q.base)) != null) {
                      (w.currentSteal = t).doExec();
                      w.currentSteal = ps;
                      if (++w.nsteals < 0)
                          w.transferStealCount(this);
                  }
              }
              else if (active) {      // decrement active count without queuing
                  long nc = (AC_MASK & ((c = ctl) - AC_UNIT)) | (~AC_MASK & c);
                  if (U.compareAndSwapLong(this, CTL, c, nc))
                      active = false;
              }
              else if ((int)((c = ctl) >> AC_SHIFT) + (config & SMASK) <= 0 &&
                       U.compareAndSwapLong(this, CTL, c, c + AC_UNIT))
                  break;
          }
      }
docs: Runs tasks until {@code isQuiescent()}. We piggyback on
  active count ctl maintenance, but rather than blocking
  when tasks cannot be found, we rescan until all others cannot
  find tasks either.