public void dispose()

in mobius-core/src/main/java/com/spotify/mobius/runners/ExecutorServiceWorkRunner.java [58:77]


  public void dispose() {
    try {
      lock.lock();
      try {
        List<Runnable> runnables = service.shutdownNow();
        if (!runnables.isEmpty()) {
          LOGGER.warn(
              "Disposing ExecutorServiceWorkRunner with {} outstanding tasks.", runnables.size());
        }
      } finally {
        lock.unlock();
      }

      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);
    }
  }