Whether to use invokeAll or submit - java Executor service
问题 I have a scenario where I have to execute 5 thread asynchronously for the same callable. As far as I understand, there are two options: 1) using submit(Callable) ExecutorService executorService = Executors.newFixedThreadPool(5); List<Future<String>> futures = new ArrayList<>(); for(Callable callableItem: myCallableList){ futures.add(executorService.submit(callableItem)); } 2) using invokeAll(Collections of Callable) ExecutorService executorService = Executors.newFixedThreadPool(5); List