Forks the given tasks, returning when {@code isDone} holds for
each task or an (unchecked) exception is encountered, in which
case the exception is rethrown. If more than one task
encounters an exception, then this method throws any one of
these exceptions. If any task encounters an exception, others
may be cancelled. However, the execution status of individual
tasks is not guaranteed upon exceptional return. The status of
each task may be obtained using {@link #getException()} and
related methods to check if they have been cancelled, completed
normally or exceptionally, or left unprocessed.
@param tasks the tasks
@throws NullPointerException if any task is null
Forks the given tasks, returning when {@code isDone} holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown. If more than one task encounters an exception, then this method throws any one of these exceptions. If any task encounters an exception, others may be cancelled. However, the execution status of individual tasks is not guaranteed upon exceptional return. The status of each task may be obtained using {@link #getException()} and related methods to check if they have been cancelled, completed normally or exceptionally, or left unprocessed.
@param tasks the tasks @throws NullPointerException if any task is null