summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-03-17 13:08:35 -0700
committerZac Medico <zmedico@gentoo.org>2011-03-17 13:08:35 -0700
commit0eab3143c1aad2addd0f88cfd7a62940d064df3a (patch)
treea1b4ffcb4351a8026c7de5f2c595d8855449a22a /pym
parent8ab4771b6392e5e552e2a159d79c9b7eb7ef3d63 (diff)
downloadportage-0eab3143c1aad2addd0f88cfd7a62940d064df3a.tar.gz
portage-0eab3143c1aad2addd0f88cfd7a62940d064df3a.tar.bz2
portage-0eab3143c1aad2addd0f88cfd7a62940d064df3a.zip
AsynchronousLock: implement _cancel
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/AsynchronousLock.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py
index 6e0a1ac2a..6fa2bf632 100644
--- a/pym/_emerge/AsynchronousLock.py
+++ b/pym/_emerge/AsynchronousLock.py
@@ -66,6 +66,10 @@ class AsynchronousLock(AsynchronousTask):
if not self._waiting:
self.wait()
+ def _cancel(self):
+ if self._imp is not None:
+ self._imp.cancel()
+
def _wait(self):
if self.returncode is not None:
return self.returncode
@@ -127,6 +131,10 @@ class _LockThread(AbstractPollTask):
self.returncode = os.EX_OK
self.wait()
+ def _cancel(self):
+ # There's currently no way to force thread termination.
+ pass
+
def _wait(self):
if self.returncode is not None:
return self.returncode