- fibers/timer-wheel.scm ()[entry-count]: New field.
(make-timer-wheel): Initialize it.
(increment-entry-count!, decrement-entry-count!): New procedures.
(timer-wheel-remove!): Call ‘decrement-entry-count!’.
(timer-wheel-advance!): Add clause for wheels with ‘entry-count’ = 0.
Add call to ‘decrement-entry-count!’ in the non-empty case. Adjust time
base based on ‘outer’.
[tick-outer!]: Add call to ‘increment-entry-count!’.
Adjust main body to reload the time base and current pointer of ‘wheel’.
- tests/timer-wheel.scm (test-advancing-gap): New procedure.
Fixes: guile/fibers#89
* fibers/timer-wheel.scm (<timer-wheel>)[entry-count]: New field.
(make-timer-wheel): Initialize it.
(increment-entry-count!, decrement-entry-count!): New procedures.
(timer-wheel-remove!): Call ‘decrement-entry-count!’.
(timer-wheel-advance!): Add clause for wheels with ‘entry-count’ = 0.
Add call to ‘decrement-entry-count!’ in the non-empty case. Adjust time
base based on ‘outer’.
[tick-outer!]: Add call to ‘increment-entry-count!’.
Adjust main body to reload the time base and current pointer of ‘wheel’.
* tests/timer-wheel.scm (test-advancing-gap): New procedure.
Fixes: guile/fibers#89