void failQueueThenRun()

in simplestore/src/main/java/com/uber/simplestore/impl/SimpleStoreImpl.java [221:230]


  void failQueueThenRun(Exception exception, Runnable runnable) {
    if (!flush.compareAndSet(null, exception)) {
      throw new IllegalStateException();
    }
    orderedIoExecutor.execute(
        () -> {
          runnable.run();
          flush.set(null);
        });
  }