question: private void executeTasksSimultaneouslyWithBarrier ( Runnable ... tasks ) throws InterruptedException { CountDownLatch latch = new CountDownLatch ( tasks . length ) ; for ( Runnable task : tasks ) { executor . execute ( null ) ; } latch . await ( ) ; }
target:  Runs given tasks simultaneously and wait until they finish.