b.t.l.LockWrapper(object) : class documentation

Part of bzrlib.tests.lock_helpers View In Hierarchy

A wrapper which lets us set locking ability.

This also lets us record what objects were locked in what order, to ensure that locking happens correctly.

Method __init__ Wrap a locking policy around a given object.
Method __eq__ Undocumented
Method __getattr__ Undocumented
Method __setattr__ Undocumented
Method lock_read Undocumented
Method lock_write Undocumented
Method unlock Undocumented
Method disable_lock_read Make a lock_read call fail
Method disable_unlock Make an unlock call fail
Method disable_lock_write Make a lock_write call fail
def __init__(self, sequence, other, other_id):
Wrap a locking policy around a given object.
ParameterssequenceA list object where we should record actions
otherThe object to control policy on
other_idSomething to identify the object by
def __eq__(self, other):
Undocumented
def __getattr__(self, attr):
Undocumented
def __setattr__(self, attr, val):
Undocumented
def lock_read(self):
Undocumented
def lock_write(self, token=None):
Undocumented
@only_raises(errors.LockNotHeld, errors.LockBroken)
def unlock(self):
Undocumented
def disable_lock_read(self):
Make a lock_read call fail
def disable_unlock(self):
Make an unlock call fail
def disable_lock_write(self):
Make a lock_write call fail
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.