From 71b3466c9bc7c00835bf4665765d05b14c2c5c49 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 11 Feb 2012 16:05:14 -0800 Subject: [PATCH] QueueScheduler: tweak run loop logic --- pym/_emerge/QueueScheduler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/QueueScheduler.py b/pym/_emerge/QueueScheduler.py index 5f8cf2674..731a677e5 100644 --- a/pym/_emerge/QueueScheduler.py +++ b/pym/_emerge/QueueScheduler.py @@ -44,15 +44,15 @@ class QueueScheduler(PollScheduler): timeout, timeout_callback) try: - self._schedule() - - while self._keep_scheduling() and \ - not (timeout_callback is not None and + while not (timeout_callback is not None and timeout_callback.timed_out): # We don't have any callbacks to trigger _schedule(), # so we have to call it explicitly here. self._schedule() - self.sched_iface.iteration() + if self._keep_scheduling(): + self.sched_iface.iteration() + else: + break while self._is_work_scheduled() and \ not (timeout_callback is not None and -- 2.26.2