Kaydet (Commit) 849974fb authored tarafından Phillip J. Eby's avatar Phillip J. Eby

dummy_thread needs to support PEP 343 too.

üst b6e92c40
......@@ -113,6 +113,14 @@ class LockType(object):
self.locked_status = True
return True
__enter__ = acquire
def __exit__(self, typ, val, tb):
self.release()
def __context__(self):
return self
def release(self):
"""Release the dummy lock."""
# XXX Perhaps shouldn't actually bother to test? Could lead
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment