From: Zac Medico Date: Tue, 15 Jul 2008 02:49:31 +0000 (-0000) Subject: Use self.registered to return early from SubProcess.poll() when possible, X-Git-Tag: v2.2_rc2~97 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e61b65a4795409db4f6aaf0991242603113997ed;p=portage.git 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 --- 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