Skip to content
Snippets Groups Projects
Commit dc6296ff authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

locking: Simplify condition


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 52fca4ba
No related branches found
No related tags found
No related merge requests found
...@@ -1050,8 +1050,8 @@ class LockSet: ...@@ -1050,8 +1050,8 @@ class LockSet:
self.__owners[threading.currentThread()].remove(name) self.__owners[threading.currentThread()].remove(name)
# Only remove the key if we don't hold the set-lock as well # Only remove the key if we don't hold the set-lock as well
if (not self.__lock.is_owned() and if not (self.__lock.is_owned() or
not self.__owners[threading.currentThread()]): self.__owners[threading.currentThread()]):
del self.__owners[threading.currentThread()] del self.__owners[threading.currentThread()]
def list_owned(self): def list_owned(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment