public static void checkAllDone ( Collection < Future > futures ) throws Exception { for ( Future f : futures ) { if ( f . isDone ( ) ) { f . get ( ) ; } } }
Rethrow exeception of the fist future that completed with an exception