about summary refs log tree commit homepage
path: root/lib/PublicInbox/EvCleanup.pm
DateCommit message (Collapse)
2016-06-24evcleanup: micro-optimize asap function
Instead of relying on a timer with immediate callback, arm a pipe to watch for writability, ensuring the callback always fires.
2016-05-24standardize timer-related event-loop code
Standardize the code we have in place to avoid creating too many timer objects. We do not need exact timers for things that don't need to be run ASAP, so we can play things fast and loose to avoid wasting power with unnecessary wakeups. We only need two classes of timers: * asap - run this on the next loop tick, after operating on @Danga::Socket::ToClose to close remaining sockets * later - run at some point in the future. It could be as soon as immediately (like "asap"), and as late as 60s into the future. In the future, we support an "emergency" switch to fire "later" timers immediately.