AsyncScheduler: poll in _schedule_tasks
authorZac Medico <zmedico@gentoo.org>
Wed, 3 Oct 2012 18:55:50 +0000 (11:55 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 3 Oct 2012 18:55:50 +0000 (11:55 -0700)
Triggers cleanup and exit listeners if there's nothing left to do.

pym/portage/util/_async/AsyncScheduler.py

index 3fb079c4743319507f4567371cdf2385104651f6..f6285b701651c8aa96c2b9a6a190bfb668c6df91 100644 (file)
@@ -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: