MCPcopy Create free account
hub / github.com/aofeng/threadpool4j / invokeAll

Method invokeAll

src/cn/aofeng/threadpool4j/ThreadPool.java:122–122  ·  view source on GitHub ↗

在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间。 @param tasks 实现了Runnable接口的异步任务列表 @param timeout 任务执行超时时间 @param timeoutUnit 超时时间的单位 @return Future列表。注:如果在指定的时间内,有任务没有执行完,在执行Future.get操作时将抛出CancellationException。 @param 异步任务执行的结果类型 @throws IllegalArgumentException 出现以下情况时抛出: <u

(Collection<Callable<T>> tasks, 
            long timeout, TimeUnit timeoutUnit)

Source from the content-addressed store, hash-verified

120 * @see #invokeAll(Collection, long, TimeUnit, String)
121 */
122 public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks,
123 long timeout, TimeUnit timeoutUnit);
124
125 /**

Implementers 1

ThreadPoolImplsrc/cn/aofeng/threadpool4j/ThreadPoolI

Calls

no outgoing calls