public T get()

in src/main/java/com/twitter/whiskey/futures/CompletableFuture.java [113:130]


    public T get() throws InterruptedException, ExecutionException {

        if (!done) {
            synchronized(this) {
                if (!done) wait();
            }
        }

        if (error != null) {
            throw new ExecutionException(error);
        }

        if (cancelled) {
            throw new CancellationException();
        }

        return result;
    }