From: Zac Medico Date: Wed, 3 Oct 2012 18:55:50 +0000 (-0700) Subject: AsyncScheduler: poll in _schedule_tasks X-Git-Tag: v2.2.0_alpha135~3 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5de3c48a4221ec1f4a044a2e424b113770db5386;p=portage.git AsyncScheduler: poll in _schedule_tasks Triggers cleanup and exit listeners if there's nothing left to do. --- 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: