This repository was archived by the owner on Apr 2, 2018. It is now read-only.
This repository was archived by the owner on Apr 2, 2018. It is now read-only.
Timers don't always fire if the tick duration isn't a multiple of 1ms #14
Open
Description
For example, the following code may or may not terminate.
let timer = wheel()
.tick_duration(Duration::new(0, 100_000))
.build();
timer.sleep(Duration::from_millis(10)).wait().unwrap();
I suspect the problem is that the tick duration is rounded up to the next full ms for the wheel, but not for the tolerance, so the worker can unpark the task for the timer before it's ready to fire.
The solution may just be to disallow invalid tick durations.
Metadata
Metadata
Assignees
Labels
No labels