-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import dummy_threading
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):
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):
-# 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
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:
-# 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
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
-# 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
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
-# 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
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