summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-03 11:55:50 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-03 11:55:50 -0700
commit5de3c48a4221ec1f4a044a2e424b113770db5386 (patch)
tree0d2ad83e7f27eb0465cb0d7e28b5bf1bd940110f
parentAsyncScheduler: implement _poll (diff)
downloadportage-5de3c48a4221ec1f4a044a2e424b113770db5386.tar.gz
portage-5de3c48a4221ec1f4a044a2e424b113770db5386.tar.bz2
portage-5de3c48a4221ec1f4a044a2e424b113770db5386.zip
AsyncScheduler: poll in _schedule_tasks
Triggers cleanup and exit listeners if there's nothing left to do.
-rw-r--r--pym/portage/util/_async/AsyncScheduler.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/util/_async/AsyncScheduler.py b/pym/portage/util/_async/AsyncScheduler.py
index 3fb079c47..f6285b701 100644
--- a/pym/portage/util/_async/AsyncScheduler.py
+++ b/pym/portage/util/_async/AsyncScheduler.py
@@ -59,6 +59,9 @@ class AsyncScheduler(AsynchronousTask, PollScheduler):
task.addExitListener(self._task_exit)
task.start()
+ # Triggers cleanup and exit listeners if there's nothing left to do.
+ self.poll()
+
def _task_exit(self, task):
self._running_tasks.discard(task)
if task.returncode != os.EX_OK: