projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ab4771
)
AsynchronousLock: implement _cancel
author
Zac Medico
<zmedico@gentoo.org>
Thu, 17 Mar 2011 20:08:35 +0000
(13:08 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 17 Mar 2011 20:08:35 +0000
(13:08 -0700)
pym/_emerge/AsynchronousLock.py
patch
|
blob
|
history
diff --git
a/pym/_emerge/AsynchronousLock.py
b/pym/_emerge/AsynchronousLock.py
index 6e0a1ac2aa95ff4ecf51aa614130b1bd3cca9671..6fa2bf632d2ff8b40af853dc7409212e1fa4c649 100644
(file)
--- 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