What is the simplest way to to wait for all tasks of ExecutorService to finish? My task is primarily computational, so I just want to run a large number of jobs
ExecutorService
Just use
latch = new CountDownLatch(noThreads)
In each thread
latch.countDown();
and as barrier
latch.await();