diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-02-13 18:35:03 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-02-13 18:35:03 -0800 |
commit | 07823ba56f63309da9547e02e96b043005932be0 (patch) | |
tree | ecdfa774f9def6fb215b5c89e77312f131b14764 /pym/_emerge/AsynchronousTask.py | |
parent | 6afd0e508eaf1f9040a20ed670cd6cf7a3a07517 (diff) | |
download | portage-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.py | 9 |
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): """ |