From: David James Date: Thu, 17 Mar 2011 04:54:37 +0000 (-0700) Subject: Update Scheduler to protect against infinite loop X-Git-Tag: v2.2.0_alpha28~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5283edc81874fdf5ddf157c3f85032b63955ac86;p=portage.git Update Scheduler to protect against infinite loop If we have running tasks, but we're not listening to these tasks, we're going to loop forever. So throw an exception in this case. --- diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index a1b0ae462..9215678bb 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -1683,15 +1683,13 @@ class Scheduler(PollScheduler): self._set_max_jobs(1) while self._schedule(): - if self._poll_event_handlers: - self._poll_loop() + self._poll_loop() while True: self._schedule() if not self._is_work_scheduled(): break - if self._poll_event_handlers: - self._poll_loop() + self._poll_loop() def _keep_scheduling(self): return bool(not self._terminated_tasks and self._pkg_queue and \