提交 6f5241a3 编写于 作者: 如梦技术's avatar 如梦技术 🐛

TimingWheel 完善,待添加进业务。

上级 ca47928a
......@@ -59,7 +59,7 @@ public class SystemTimer implements Timer, Function<TimerTaskEntry, Void> {
private final ReentrantReadWriteLock.WriteLock writeLock = readWriteLock.writeLock();
public SystemTimer() {
this("SystemTimer");
this("SystemTimerExecutor");
}
public SystemTimer(String executeName) {
......@@ -72,7 +72,7 @@ public class SystemTimer implements Timer, Function<TimerTaskEntry, Void> {
public SystemTimer(long tickMs, int wheelSize, long startMs, String executeName) {
taskExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>(Integer.MAX_VALUE), r -> new Thread(r, "SystemTimerExecutor" + executeName));
new LinkedBlockingQueue<>(Integer.MAX_VALUE), r -> new Thread(r, executeName));
timingWheel = new TimingWheel(tickMs, wheelSize, startMs, taskCounter, delayQueue);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册