- 使用ExecutorService+Callable
- ExecutorService executor = Executors.newFixedThreadPool(4);
- executor.invokeAll(xxxList.stream().map(Task:new).collect(Collectors.toList()));
- class Task implements Callable
{@Override public Xxx call() throws Exception { // operations }}