v0.10.0
This release brings a lot of deep changes to calloop, the highlights being:
Error handling is revamped: The error handling machinery of calloop has been completely revamped (thanks to @detly). A calloop::Error
type is introduced, and the EventSource
trait now has an Error
associated type. Each event source now has its own error type.
Timer sources rework: Timer event sources are completely reworked, making them more flexible and integrating them directly into the event loop core logic, thus avoiding to spawn a background thread to manage them. This also introduces a "high-precision mode" for the event loop allowing sub-millisecond accuracy for the timers, it is obtained by initializing it with the try_new_high_precision()
method.
Several other changes were introduced in this release:
- The MSRV is bumped to
1.53.0
- The
generic::Fd
adapter is now removed, asRawFd
implementsAsRawFd
, makingGeneric<RawFd>
usable. - The internal logic of calloop has been reworked around a
slotmap
, making theRegistrationToken
nowCopy
. This causes a breaking change to the low-levelPoll
API. - The
PingSource
event source now uses an eventfd instead of a pipe on Linux (thanks to @detly).