Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 860 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 860 Bytes

executions

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