Use AbstractPollTask._wait_loop() more.
authorZac Medico <zmedico@gentoo.org>
Thu, 9 Feb 2012 06:23:32 +0000 (22:23 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 9 Feb 2012 06:23:32 +0000 (22:23 -0800)
pym/_emerge/AsynchronousLock.py
pym/_emerge/FifoIpcDaemon.py
pym/_emerge/PipeReader.py

index 2c4fe108c4fd186a0f4e35a115fada95f675d767..3cf0acbd54df76bafbb449bf3bbfaf9244709007 100644 (file)
@@ -152,8 +152,7 @@ class _LockThread(AbstractPollTask):
        def _wait(self):
                if self.returncode is not None:
                        return self.returncode
-               while self._registered:
-                       self.scheduler.iteration()
+               self._wait_loop()
                return self.returncode
 
        def unlock(self):
@@ -264,8 +263,7 @@ class _LockProcess(AbstractPollTask):
        def _wait(self):
                if self.returncode is not None:
                        return self.returncode
-               while self._registered:
-                       self.scheduler.iteration()
+               self._wait_loop()
                return self.returncode
 
        def _output_handler(self, f, event):
index cbe80589b23f63aa93551fb30a1b94fb99feff3e..fcc4ab4b9a9ce65bfc8ded96f00a1e1e18439870 100644 (file)
@@ -51,13 +51,9 @@ class FifoIpcDaemon(AbstractPollTask):
        def _wait(self):
                if self.returncode is not None:
                        return self.returncode
-
-               while self._registered:
-                       self.scheduler.iteration()
-
+               self._wait_loop()
                if self.returncode is None:
                        self.returncode = os.EX_OK
-
                return self.returncode
 
        def _input_handler(self, fd, event):
index 54c6eb77e7cea4f3fdf1175d0a2cf827fc1539da..90febdf4456dd6b3c943a6b94bafdbb9860a05e7 100644 (file)
@@ -43,10 +43,7 @@ class PipeReader(AbstractPollTask):
        def _wait(self):
                if self.returncode is not None:
                        return self.returncode
-
-               while self._registered:
-                       self.scheduler.iteration()
-
+               self._wait_loop()
                self.returncode = os.EX_OK
                return self.returncode