From: Zac Medico Date: Tue, 29 Jul 2008 19:30:37 +0000 (-0000) Subject: Disable auto_schedule on all of Scheduler._task_queues and schedule them X-Git-Tag: v2.2_rc5~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=46c51bf2bf6ad2cf07cf7c28979d53f4f3db1fee;p=portage.git Disable auto_schedule on all of Scheduler._task_queues and schedule them inside _schedule_tasks(). This should help solve a tight loop. svn path=/main/trunk/; revision=11269 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 6951590db..3fee85d03 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -8826,13 +8826,7 @@ class Scheduler(PollScheduler): self._task_queues = self._task_queues_class() for k in self._task_queues.allowed_keys: setattr(self._task_queues, k, - SequentialTaskQueue(auto_schedule=True)) - - # Merge tasks currently run synchronously which makes - # it necessary to disable auto_schedule in order to - # avoid excess recursion which prevents tasks from - # being marked complete as soon as they should be. - self._task_queues.merge.auto_schedule = False + SequentialTaskQueue()) self._prefetchers = weakref.WeakValueDictionary() self._pkg_queue = [] @@ -9654,7 +9648,9 @@ class Scheduler(PollScheduler): self._poll_loop() def _schedule_tasks(self): - self._task_queues.merge.schedule() + remaining, state_change = self._schedule_tasks_imp() + for q in self._task_queues.values(): + q.schedule() # Cancel prefetchers if they're the only reason # the main poll loop is still running.