CompletableFuture.get

Waits if necessary for at most the given time for this future to complete, and then returns its result, if available.

@param timeout the maximum time to wait @param unit the time unit of the timeout argument @return the result value @throws CancellationException if this future was cancelled @throws ExecutionException if this future completed exceptionally @throws InterruptedException if the current thread was interrupted while waiting @throws TimeoutException if the wait timed out

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

Meta