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