From 73db76404cd9ef1c988eb0ae5b25bd4693127b99 Mon Sep 17 00:00:00 2001 From: wuweifeng10 Date: Fri, 27 Dec 2019 17:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9=E5=90=8C=E6=AD=A5=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=9C=89=E4=B8=AA=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/tianyalei/async/executor/Async.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/tianyalei/async/executor/Async.java b/src/main/java/com/tianyalei/async/executor/Async.java index 13551c7..6f20dc1 100644 --- a/src/main/java/com/tianyalei/async/executor/Async.java +++ b/src/main/java/com/tianyalei/async/executor/Async.java @@ -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), COMMON_POOL); + futures[i] = CompletableFuture.runAsync(() -> wrapper.work(COMMON_POOL, timeout), pool); } try { CompletableFuture.allOf(futures).get(timeout, TimeUnit.MILLISECONDS);