class ExecutorServiceWorkRunner implements WorkRunner {

  @Override
  public void dispose() {
    try {
      List<Runnable> runnables = service.shutdownNow();

      if (!runnables.isEmpty()) {
        LOGGER.warn(
            "Disposing ExecutorServiceWorkRunner with {} outstanding tasks.", runnables.size());
      }

      if (!service.awaitTermination(100, TimeUnit.MILLISECONDS)) {
        LOGGER.error("ExecutorService shutdown timed out; there are still tasks executing");
      }
    } catch (InterruptedException e) {
      LOGGER.error("Timeout when disposing work runner", e);
    }
  }

  public  ExecutorServiceWorkRunner(ExecutorService service);

}