summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/AsynchronousLock.py10
-rw-r--r--pym/_emerge/CompositeTask.py5
-rw-r--r--pym/_emerge/FifoIpcDaemon.py7
-rw-r--r--pym/_emerge/PipeReader.py7
-rw-r--r--pym/_emerge/SubProcess.py5
5 files changed, 17 insertions, 17 deletions
diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py
index e166df344..2c4fe108c 100644
--- a/pym/_emerge/AsynchronousLock.py
+++ b/pym/_emerge/AsynchronousLock.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import dummy_threading
@@ -152,8 +152,8 @@ class _LockThread(AbstractPollTask):
def _wait(self):
if self.returncode is not None:
return self.returncode
- if self._registered:
- self.scheduler.schedule(self._reg_id)
+ while self._registered:
+ self.scheduler.iteration()
return self.returncode
def unlock(self):
@@ -264,8 +264,8 @@ class _LockProcess(AbstractPollTask):
def _wait(self):
if self.returncode is not None:
return self.returncode
- if self._registered:
- self.scheduler.schedule(self._reg_id)
+ while self._registered:
+ self.scheduler.iteration()
return self.returncode
def _output_handler(self, f, event):
diff --git a/pym/_emerge/CompositeTask.py b/pym/_emerge/CompositeTask.py
index 644a69bb2..e56188db1 100644
--- a/pym/_emerge/CompositeTask.py
+++ b/pym/_emerge/CompositeTask.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from _emerge.AsynchronousTask import AsynchronousTask
@@ -60,7 +60,8 @@ class CompositeTask(AsynchronousTask):
self._current_task = None
break
else:
- self.scheduler.schedule(condition=self._task_queued_wait)
+ while not self._task_queued_wait():
+ self.scheduler.iteration()
if self.returncode is not None:
break
elif self.cancelled:
diff --git a/pym/_emerge/FifoIpcDaemon.py b/pym/_emerge/FifoIpcDaemon.py
index b1f7a9569..cbe80589b 100644
--- a/pym/_emerge/FifoIpcDaemon.py
+++ b/pym/_emerge/FifoIpcDaemon.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage import os
@@ -52,9 +52,8 @@ class FifoIpcDaemon(AbstractPollTask):
if self.returncode is not None:
return self.returncode
- if self._registered:
- self.scheduler.schedule(self._reg_id)
- self._unregister()
+ while self._registered:
+ self.scheduler.iteration()
if self.returncode is None:
self.returncode = os.EX_OK
diff --git a/pym/_emerge/PipeReader.py b/pym/_emerge/PipeReader.py
index a85d794e2..54c6eb77e 100644
--- a/pym/_emerge/PipeReader.py
+++ b/pym/_emerge/PipeReader.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage import os
@@ -44,9 +44,8 @@ class PipeReader(AbstractPollTask):
if self.returncode is not None:
return self.returncode
- if self._registered:
- self.scheduler.schedule(self._reg_ids)
- self._unregister()
+ while self._registered:
+ self.scheduler.iteration()
self.returncode = os.EX_OK
return self.returncode
diff --git a/pym/_emerge/SubProcess.py b/pym/_emerge/SubProcess.py
index c5cac7dde..c3dc74a91 100644
--- a/pym/_emerge/SubProcess.py
+++ b/pym/_emerge/SubProcess.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage import os
@@ -77,7 +77,8 @@ class SubProcess(AbstractPollTask):
if self._registered:
self._orphan_process_warn()
else:
- self.scheduler.schedule(self._reg_id)
+ while self._registered:
+ self.scheduler.iteration()
self._unregister()
if self.returncode is not None:
return self.returncode