@Override
    void offer(@NotNull Runnable runnable, int delay, Promise<?> promise) {
      delegate.offer(() -> {
        Thread thread = Thread.currentThread();
        if (!threads.add(thread)) {
          LOG.error("current thread is already used");
        }
        else {
          try {
            runnable.run(); // may throw an assertion error
          }
          finally {
            if (!threads.remove(thread)) {
              LOG.error("current thread is already removed");
            }
          }
        }
      }, delay, promise);
    }
@Override
    void offer(@NotNull Runnable runnable, int delay, Promise<?> promise)