abstract fun join(): Unit
(source)
Waits if necessary for the computation to complete.
CompletionException
- If the computation threw an exception.
InterruptedException
- If the current thread was interrupted while waiting.
abstract fun join(timeout: Long, unit: TimeUnit): Unit
(source)
Waits if necessary for at most the given time for the computation to complete.
timeout
- The maximum time to wait.
unit
- The time unit of the timeout argument.
CompletionException
- If the computation threw an exception.
TimeoutException
- If the wait timed out.
InterruptedException
- If the current thread was interrupted while waiting.