An abstraction layer on top of the Executors framework to simplify common patterns of parallel tasks executions
Callable oneSecondTask = ... Callable twoSecondsTask = ... Callable tenSecondsTask = ...
Collection results = Executions.newExecution().withTask(oneSecondTask) .withTask(twoSecondsTask) .withTask(tenSecondsTask) .withTimeout(5,TimeUnit.SECONDS) .withExecutor(Executors.newFixedThreadPool(4)) .execute();
results.size(); //It returns 2