CompletableFuture.orTimeout

Exceptionally completes this CompletableFuture with a {@link TimeoutException} if not otherwise completed before the given timeout.

@param timeout how long to wait before completing exceptionally with a TimeoutException, in units of {@code unit} @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter @return this CompletableFuture

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

Meta