mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Motivation: When calling Selector.whenReady(...) and using a SelectorStrategy.blockUntil(...) we may end up re-arm the timerfd each time even if the wakeup time did not change. This is expensive and can be avoided in most situations. Modifications: Keep track of the earliest scheduled timer and only schedule a new one if it would fire sooner. Result: Less overhead when using epoll and timers.