From 3ebc50803744b60ebc1cb0dc4f5356b73ded6075 Mon Sep 17 00:00:00 2001 From: tcsnzh Date: Sat, 24 Jul 2021 20:39:34 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9B=B4=E6=96=B0=E4=BA=86=E8=BF=87=E6=97=B6?= =?UTF-8?q?=E7=9A=84QuickStart.md=E4=B8=AD=E5=A3=B0=E6=98=8E=E7=9A=84?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E8=BF=87=E6=97=B6=E7=9A=84Async.beginWork?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E5=B9=B6=E6=9B=BF=E6=8D=A2=E6=88=90?= =?UTF-8?q?=E6=96=B0=E7=9A=84Async.work=202.=E8=A1=A5=E5=85=85=E4=BA=86Asy?= =?UTF-8?q?nc=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QuickStart.md | 6 +++--- .../src/main/java/com/jd/platform/async/executor/Async.java | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/QuickStart.md b/QuickStart.md index ec1e1db..9f997ca 100644 --- a/QuickStart.md +++ b/QuickStart.md @@ -493,7 +493,7 @@ Async.work(1000, Executors.newFixedThreadPool(2),a).awaitFinish(); WorkerWrapper会在这些情况被运行: -* 在`Async.beginWork`中传入wrapper +* 在`Async.work`中传入wrapper * 上游wrapper完成后被调用 开始运行时,执行逻辑如下图所示: @@ -1259,11 +1259,11 @@ class Case7 { ### 设置超时 -可以在`Async.beginWork(/* ... */)`中传入总超时时间,也可以对单个wrapper设置超时时间。 +可以在`Async.work(/* ... */)`中传入总超时时间,也可以对单个wrapper设置超时时间。 #### 总任务时间超时 -在`Async.beginWork`方法中可以指定总超时时间。 +在`Async.work`方法中可以指定总超时时间。 #### 单wrapper任务时间超时 diff --git a/asyncTool-core/src/main/java/com/jd/platform/async/executor/Async.java b/asyncTool-core/src/main/java/com/jd/platform/async/executor/Async.java index 8948d8d..e7649cb 100644 --- a/asyncTool-core/src/main/java/com/jd/platform/async/executor/Async.java +++ b/asyncTool-core/src/main/java/com/jd/platform/async/executor/Async.java @@ -126,6 +126,7 @@ public class Async { /** * 该方法将会返回{@link #COMMON_POOL},如果还未初始化则会懒加载初始化后再返回。 + * 详情参考{@link #COMMON_POOL}上的注解 */ public static ThreadPoolExecutor getCommonPool() { if (COMMON_POOL == null) { -- Gitee