CompletableFuture.completeOnTimeout

Completes this CompletableFuture with the given value if not otherwise completed before the given timeout.

@param value the value to use upon timeout @param timeout how long to wait before completing normally with the given value, in units of {@code unit} @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter @return this CompletableFuture

  1. CompletableFuture!(T) completeOnTimeout(Duration timeout)
  2. CompletableFuture!(T) completeOnTimeout(T value, Duration timeout)
    class CompletableFuture(T)
    static if(!(is(T == void)))
    completeOnTimeout
    (,
    Duration timeout
    )

Meta