private void rejectAndDispose(@NotNull AsyncPromise<? extends T> asyncResult) {
    if (asyncResult.setError("rejected")) {
      return;
    }

    T result;
    try {
      result = asyncResult.blockingGet(0);
    }
    catch (TimeoutException e) {
      throw new RuntimeException(e);
    }
    catch (ExecutionException e) {
      throw new RuntimeException(e.getCause());
    }

    if (result != null) {
      disposeResult(result);
    }
  }
private void rejectAndDispose(@NotNull AsyncPromise<? extends T> asyncResult)