summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/AsynchronousTask.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-13 18:35:03 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-13 18:35:03 -0800
commit07823ba56f63309da9547e02e96b043005932be0 (patch)
treeecdfa774f9def6fb215b5c89e77312f131b14764 /pym/_emerge/AsynchronousTask.py
parent6afd0e508eaf1f9040a20ed670cd6cf7a3a07517 (diff)
downloadportage-07823ba56f63309da9547e02e96b043005932be0.tar.gz
portage-07823ba56f63309da9547e02e96b043005932be0.tar.bz2
portage-07823ba56f63309da9547e02e96b043005932be0.zip
AsynchronousTask: don't wait for exit status
Synchronous waiting for status is not supported, since it would be vulnerable to hitting the recursion limit when a large number of tasks need to be terminated simultaneously, like in bug #402335.
Diffstat (limited to 'pym/_emerge/AsynchronousTask.py')
-rw-r--r--pym/_emerge/AsynchronousTask.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/_emerge/AsynchronousTask.py b/pym/_emerge/AsynchronousTask.py
index d57ccab2b..a1467b0b5 100644
--- a/pym/_emerge/AsynchronousTask.py
+++ b/pym/_emerge/AsynchronousTask.py
@@ -56,10 +56,17 @@ class AsynchronousTask(SlotObject):
return self.returncode
def cancel(self):
+ """
+ Cancel the task, but do not wait for exit status. If asynchronous exit
+ notification is desired, then use addExitListener to add a listener
+ before calling this method.
+ NOTE: Synchronous waiting for status is not supported, since it would
+ be vulnerable to hitting the recursion limit when a large number of
+ tasks need to be terminated simultaneously, like in bug #402335.
+ """
if not self.cancelled:
self.cancelled = True
self._cancel()
- self.wait()
def _cancel(self):
"""