public synchronized void shutDown(Duration duration) throws InterruptedException {
    executor.shutdownNow();
    executor.awaitTermination(duration.toMillis(), MILLISECONDS);
    tasks.clear();
  }
Cancels all current running threads.
The thread pool remains open, and this contention service can be reused.
geode-junit/src/main/java/org/apache/geode/test/concurrent/CPUContentionService.java