Commit 41a26b68 authored by Guido Trotter's avatar Guido Trotter
Browse files

Remove utils.LockedMethod

All users of this function were converted to another method, hence we
can remove it.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent 99bd4f0a
......@@ -3184,34 +3184,6 @@ def IgnoreSignals(fn, *args, **kwargs):
def LockedMethod(fn):
"""Synchronized object access decorator.
This decorator is intended to protect access to an object using the
object's own lock which is hardcoded to '_lock'.
def _LockDebug(*args, **kwargs):
if debug_locks:
logging.debug(*args, **kwargs)
def wrapper(self, *args, **kwargs):
# pylint: disable-msg=W0212
assert hasattr(self, '_lock')
lock = self._lock
_LockDebug("Waiting for %s", lock)
_LockDebug("Acquired %s", lock)
result = fn(self, *args, **kwargs)
_LockDebug("Releasing %s", lock)
_LockDebug("Released %s", lock)
return result
return wrapper
def LockFile(fd):
"""Locks a file using POSIX locks.
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