An ExecutorService
has just the method for that.
And it (nearly) fits your demands, since it returns a List<Future<T>>
.
Therefore:
final List<Future<Whatever>> list = service.invokeAll(myCallables);
// walk list and call .get() on each future
Note that as the doc says, this method will wait until all callables are done. Also, you still need to check for failures in each Future
.