From e61b65a4795409db4f6aaf0991242603113997ed Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 15 Jul 2008 02:49:31 +0000 Subject: [PATCH] Use self.registered to return early from SubProcess.poll() when possible, and remove the related code from SequentialTaskQueue.schedule() since this makes it obsolete. svn path=/main/trunk/; revision=11052 --- pym/_emerge/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index ef16f477c..7960872d5 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1914,6 +1914,8 @@ class SubProcess(AsynchronousTask): return self.returncode if self.pid is None: return self.returncode + if self.registered: + return self.returncode try: retval = os.waitpid(self.pid, os.WNOHANG) @@ -7993,8 +7995,6 @@ class SequentialTaskQueue(SlotObject): state_changed = False for task in list(running_tasks): - if hasattr(task, "registered") and task.registered: - continue if task.poll() is not None: state_changed = True -- 2.26.2