public synchronized void runUntil(BooleanSupplier stopCondition) {
    if (!tasks.isEmpty()) {
      throw new IllegalStateException("Only one " + getClass().getSimpleName()
          + " can be in progress at a time");
    }
    stopWatcher.set(executor.submit(watchForStop(stopCondition)));
    for (int i = 1; i < threadCount; i++) {
      tasks.add(executor.submit(generateProbablePrimes()));
    }
  }
Runs all threads until {@code stop()} or {@code shutDown()} are called.
geode-junit/src/main/java/org/apache/geode/test/concurrent/CPUContentionService.java