summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/QueueScheduler.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-03-10 22:02:19 -0800
committerZac Medico <zmedico@gentoo.org>2011-03-10 22:02:19 -0800
commit9411ac7406c6e775998bf6055ca8f022acce9e25 (patch)
tree3f3ce2da2f612a389d8855ce3f50bb274d4b5ecb /pym/_emerge/QueueScheduler.py
parent33946e6594e16d1c8ff493cf71b8587878ec7b29 (diff)
downloadportage-9411ac7406c6e775998bf6055ca8f022acce9e25.tar.gz
portage-9411ac7406c6e775998bf6055ca8f022acce9e25.tar.bz2
portage-9411ac7406c6e775998bf6055ca8f022acce9e25.zip
PollScheduler: tweek termination logic
* PollScheduler and all subclasses now use the _terminated_tasks variable to check whether or not _terminate_tasks() has been called, and behave appropriately in that case. * The _schedule_tasks() method now has documentation about the relationship with _terminate_tasks() and _terminated_tasks.
Diffstat (limited to 'pym/_emerge/QueueScheduler.py')
-rw-r--r--pym/_emerge/QueueScheduler.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/_emerge/QueueScheduler.py b/pym/_emerge/QueueScheduler.py
index 8a7ea300a..2d727c95d 100644
--- a/pym/_emerge/QueueScheduler.py
+++ b/pym/_emerge/QueueScheduler.py
@@ -79,6 +79,9 @@ class QueueScheduler(PollScheduler):
@returns: True if there may be remaining tasks to schedule,
False otherwise.
"""
+ if self._terminated_tasks:
+ return False
+
while self._can_add_job():
n = self._max_jobs - self._running_job_count()
if n < 1: