mirror of
https://gitee.com/jd-platform-opensource/asyncTool.git
synced 2025-12-26 05:37:19 +08:00
!12 修复了了上次更新的文档中没有更新的细节部分
Merge pull request !12 from TcSnZh/dev-tcsnzh
This commit is contained in:
commit
fbb4bd989b
@ -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任务时间超时
|
||||
|
||||
|
||||
@ -126,6 +126,7 @@ public class Async {
|
||||
|
||||
/**
|
||||
* 该方法将会返回{@link #COMMON_POOL},如果还未初始化则会懒加载初始化后再返回。
|
||||
* 详情参考{@link #COMMON_POOL}上的注解
|
||||
*/
|
||||
public static ThreadPoolExecutor getCommonPool() {
|
||||
if (COMMON_POOL == null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user