timewheel icon indicating copy to clipboard operation
timewheel copied to clipboard

时间轮定时器

Results 10 timewheel issues
Sort by recently updated
recently updated
newest added

这个时间轮定时器支持最长多长时间,1天,7天,30天,还是说没有限制呢?

如果定时器还未到,要获取剩余时间,如何做比较好,用2个channel吗?

scanAndRunTask 。这个方法里面,我觉得,要考虑一下,里面的 元素的大小,比如,netty 中,限制了 10w ,就 转到下一个 格子了。因为现在在做定时消息,量级在百万级别的。

实际代码可能出现start和stop不对等,Stop时会出现向tw.stopC写入数据,但是tw.stopC还没被监听,这时会阻塞在写tw.stopC,建议改为close(tw.stopC)