My Question: How to execute a bunch of threaded objects on a ThreadPoolExecutor and wait for them all to finish before moving on?
I\'m new to Thread
You should loop on awaitTermination
awaitTermination
ExecutorService threads; // ... // Tell threads to finish off. threads.shutdown(); // Wait for everything to finish. while (!threads.awaitTermination(10, TimeUnit.SECONDS)) { log.info("Awaiting completion of threads."); }