public static List<Closure> joinAll(final List<Task> tasks) throws InterruptedException {
        final List<Closure> closures = new ArrayList<>(tasks.size());
        for (final Task t : tasks) {
            closures.add(t.join());
        }
        return closures;
    }
Waiting for all tasks to complete.

@param tasks task list
@return the closure list in tasks
@throws InterruptedException if the current thread is interrupted while waiting
@since 1.3.1
jraft-core/src/main/java/com/alipay/sofa/jraft/entity/Task.java