-
Konstantin Osipov authored
We already install signal handlers, but don't give them a chance to execute, since don't yield during recovery. Add yields once per a few tens of thousands of events. Deploy a special hack with an idle watcher to make sure that fiber_sleep(0) doesn't sleep for too long (1 ms without this watcher). libev sleeps for at least 1 ms (backend_mintime) unless there are idle watchers. The logic of this behaviour is obscure to say the least. Since the upstream is also using *screw-the-community* cvs for revision control, maintaining an own patch set on top of the upstream is also a pain in the neck. So, instead of patching libev (I hesitate to simply remove the obscure logic since I don't understand the reason for it from the comments, and I don't think making this logic optional is worth the hassle, given also that we will diverge even more from the upstream), create an idle watcher in fiber_sleep(), as a workaround, to make sure backend_mintime is not looked at when calculating sleep time for poll(), and zero timeout is used instead.
Konstantin Osipov authoredWe already install signal handlers, but don't give them a chance to execute, since don't yield during recovery. Add yields once per a few tens of thousands of events. Deploy a special hack with an idle watcher to make sure that fiber_sleep(0) doesn't sleep for too long (1 ms without this watcher). libev sleeps for at least 1 ms (backend_mintime) unless there are idle watchers. The logic of this behaviour is obscure to say the least. Since the upstream is also using *screw-the-community* cvs for revision control, maintaining an own patch set on top of the upstream is also a pain in the neck. So, instead of patching libev (I hesitate to simply remove the obscure logic since I don't understand the reason for it from the comments, and I don't think making this logic optional is worth the hassle, given also that we will diverge even more from the upstream), create an idle watcher in fiber_sleep(), as a workaround, to make sure backend_mintime is not looked at when calculating sleep time for poll(), and zero timeout is used instead.