public final void set(@NotNull T result) {
    Promise<T> oldValue = ref.getAndSet(Promises.resolvedPromise(result));
    if (oldValue instanceof AsyncPromise) {
      rejectAndDispose((AsyncPromise<T>)oldValue);
    }
  }
public final void set(@NotNull T result)