private static void waitForAll ( Iterable < ? extends Future < ? > > futures ) throws InterruptedException , ExecutionException { for ( Future < ? > future : futures ) { future . get ( ) ; } }
Waits for all futures to complete discarding any results .