mirror of
https://gitee.com/jd-platform-opensource/asyncTool.git
synced 2025-12-26 05:37:19 +08:00
设置单个任务超时时间轮
This commit is contained in:
parent
7f253591d2
commit
e71890ff79
@ -90,7 +90,7 @@ public class WheelMain {
|
||||
return;
|
||||
}
|
||||
//放到第几个槽
|
||||
int putIndex = INDEX.get() + delay % MAX_SIZE - 1;
|
||||
int putIndex = INDEX.get() + delay % MAX_SIZE - 1 + 20;
|
||||
CopyOnWriteArrayList<SingleTask> list = allTaskList.get(putIndex % MAX_SIZE);
|
||||
//添加到该槽位的队列中
|
||||
list.add(singleTask);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user