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());
}