Add a missing check in Scheduler._main_loop() to ensure that max_jobs
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Jul 2008 00:39:48 +0000 (00:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Jul 2008 00:39:48 +0000 (00:39 -0000)
isn't exceeded.

svn path=/main/trunk/; revision=10978

pym/_emerge/__init__.py

index 3c94d61f204d68f0041651e94e34373aea1b94eb..9a9965b61487e51a26d26c89557f2fb89f19fa54 100644 (file)
@@ -7986,9 +7986,14 @@ class Scheduler(object):
                pkg_queue = self._pkg_queue
                failed_pkgs = self._failed_pkgs
                task_queues = self._task_queues
+               max_jobs = self._max_jobs
 
                while pkg_queue and not failed_pkgs:
 
+                       if self._jobs >= max_jobs:
+                               self._schedule_main()
+                               continue
+
                        pkg = self._choose_pkg()
 
                        if not pkg.installed: