From: Zac Medico Date: Sat, 11 Feb 2012 21:11:10 +0000 (-0800) Subject: EventLoop.iteration: run timeouts if no fds X-Git-Tag: v2.2.0_alpha86~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=517b791999843b1749c1c8d84c5908634524dc5c;p=portage.git EventLoop.iteration: run timeouts if no fds --- diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py index a7161dbd5..07d9bec88 100644 --- a/pym/portage/util/_eventloop/EventLoop.py +++ b/pym/portage/util/_eventloop/EventLoop.py @@ -162,7 +162,15 @@ class EventLoop(object): events_handled = 0 if not event_handlers: - return bool(events_handled) + if not self._polling: + self._polling = True + try: + if self._run_timeouts(): + events_handled += 1 + finally: + self._polling = False + if not event_handlers: + return bool(events_handled) if not self._poll_event_queue: if may_block: