private @NotNull <T> CancellablePromise<T> promise(@NotNull Task<T, ?> task, int delay) {
    if (delay < 0) {
      throw new IllegalArgumentException("delay must be non-negative: " + delay);
    }
    if (task.canInvoke(disposed)) {
      offerSafely(task, 0, delay);
    }
    return task.promise;
  }
private @NotNull <T> CancellablePromise<T> promise(@NotNull Task<T, ?> task, int delay)