mirror of
https://gitee.com/jd-platform-opensource/asyncTool.git
synced 2025-12-26 05:37:19 +08:00
fix bug
This commit is contained in:
parent
73db76404c
commit
925e434d78
@ -33,7 +33,7 @@ public class Async {
|
||||
CompletableFuture[] futures = new CompletableFuture[workerWrappers.size()];
|
||||
for (int i = 0; i < workerWrappers.size(); i++) {
|
||||
WorkerWrapper wrapper = workerWrappers.get(i);
|
||||
futures[i] = CompletableFuture.runAsync(() -> wrapper.work(COMMON_POOL, timeout), pool);
|
||||
futures[i] = CompletableFuture.runAsync(() -> wrapper.work(pool, timeout), pool);
|
||||
}
|
||||
try {
|
||||
CompletableFuture.allOf(futures).get(timeout, TimeUnit.MILLISECONDS);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user