Java
- 4 ответа
- 0 вопросов
1
Вклад в тег
ExecutorService executor = Executors.newFixedThreadPool(4);
List<Future<MyResult>> futures = new ArrayList<>();
for (File path: imgToProcPath) {
executor.submit(new MyImageProcessingTask(path);
}
for (Future<MyResult> future: futures) {
displayThumbnail(future.get());
}