- Fix
term-variable-capturewarnings - Require at least GHC 9.2
- Add
count, which returns the number of timers in a timer wheel - Add
Secondstype alias for readability - Add
Timernewtype for readability - Make
create/withno longer throw an exception if given an invalid config; rather, the config's invalid values are replaced with sensible defaults - Make
recurring/recurring_handle delays that are shorter than the wheel resolution more correctly - Make
recurring/recurring_no longer throw an exception if given a negative delay - Make calling
cancelmore than once on a recurring timer not enter an infinite loop - Make timers that expire in the same batch no longer fire in an arbitrary order
- Improve the resolution of timers from microseconds to nanoseconds
- Simplify and optimize internals
- Fix inaccurate haddock on
recurring
- Add
create - Rename
Data.TimerWheeltoTimerWheel - Swap out
vectorforarray - Treat negative delays as 0
- Drop support for GHC < 8.6
- Add
with - Add support for GHC 8.8, GHC 8.10
- Change type of
spokesfromNaturaltoInt - Change order of delay and action arguments in
register,register_,recurring, andrecurring_ - Simplify
cancelto returnTrueat most once - Throw an error if a negative delay is provided to
register,register_,recurring, orrecurring_ - Fix underflow bug that affected recurring timers
- Remove
create,destroy - Remove
TimerWheelDiedexception.withnow simply re-throws the exception that the timer wheel thread throws - Remove
InvalidTimerWheelConfigexception.erroris used instead - Remove support for GHC < 8.6
- Swap out
ghc-primandprimitiveforvector
- Add
destroyfunction, for reaping the background thread - Add
recurring_function - If the timer wheel reaper thread crashes, it will propagate the exception to the thread that spawned it
newmay now throwInvalidTimerWheelConfig- The cancel action returned by
registeris now memoized, which fixes a bug involving trying to cancel arecurringtimer twice. The second call used to spin forever and peg a CPU - Use
Configtype for creating a timer wheel - Change argument order around
- Rename
newtocreate - Make recurring timers more accurate
- Initial release