I'm not sure how you do this, but I would have everything that ran the async tasks (preferably using Executor ) to return Future<?> For every task that you run. Then you just need to put all the Future<?> In the Collection and loop through the get() call:
List<Future<?>> futures = startAsyncTasks(); for (Future<?> future : futures) { future.get(); }
I left the exception handling for get() here, but thats the general idea.
Colind
source share