Starts all callables for parallel execution (using a ThreadPoolExecutor) without waiting for the results. @param callables Array of tasks; these might be Callable if no return value is needed (then the call methods should return null). @return Array of the
(Callable[] callables)
| 111 | * may be used to get the results. |
| 112 | */ |
| 113 | public static Future[] start(Callable[] callables) { |
| 114 | Future[] futures = new Future[callables.length]; |
| 115 | for (int i=0; i<callables.length; i++) |
| 116 | futures[i] = threadPoolExecutor.submit(callables[i]); |
| 117 | return futures; |
| 118 | } |
| 119 | |
| 120 | /** Waits for completion of all <code>Callable</code>s corresponding to the |
| 121 | * <code>Future</code>s given. |
no outgoing calls
no test coverage detected