641 |
|
} |
642 |
|
|
643 |
|
/** |
644 |
< |
* @throws CancellationException {@inheritDoc} |
644 |
> |
* Waits if necessary for the computation to complete, and then |
645 |
> |
* retrieves its result. |
646 |
> |
* |
647 |
> |
* @return the computed result |
648 |
> |
* @throws CancellationException if the computation was cancelled |
649 |
> |
* @throws ExecutionException if the computation threw an |
650 |
> |
* exception |
651 |
> |
* @throws InterruptedException if the current thread is not a |
652 |
> |
* member of a ForkJoinPool and was interrupted while waiting |
653 |
|
*/ |
654 |
|
public final V get() throws InterruptedException, ExecutionException { |
655 |
|
int s; |
679 |
|
} |
680 |
|
|
681 |
|
/** |
682 |
< |
* @throws CancellationException {@inheritDoc} |
682 |
> |
* Waits if necessary for at most the given time for the computation |
683 |
> |
* to complete, and then retrieves its result, if available. |
684 |
> |
* |
685 |
> |
* @param timeout the maximum time to wait |
686 |
> |
* @param unit the time unit of the timeout argument |
687 |
> |
* @return the computed result |
688 |
> |
* @throws CancellationException if the computation was cancelled |
689 |
> |
* @throws ExecutionException if the computation threw an |
690 |
> |
* exception |
691 |
> |
* @throws InterruptedException if the current thread is not a |
692 |
> |
* member of a ForkJoinPool and was interrupted while waiting |
693 |
> |
* @throws TimeoutException if the wait timed out |
694 |
|
*/ |
695 |
|
public final V get(long timeout, TimeUnit unit) |
696 |
|
throws InterruptedException, ExecutionException, TimeoutException { |