From 5de3c48a4221ec1f4a044a2e424b113770db5386 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 3 Oct 2012 11:55:50 -0700 Subject: AsyncScheduler: poll in _schedule_tasks Triggers cleanup and exit listeners if there's nothing left to do. --- pym/portage/util/_async/AsyncScheduler.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- cgit v1.2.3-1-g7c22