Commit 8e35ef2b authored by Joel Collins's avatar Joel Collins
Browse files

Added locked() method to check lock state

parent e30956d7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ class StrictLock(object):
        self._lock = RLock()
        self.timeout = timeout

    def locked(self):
        return self._lock.locked()

    def acquire(self, blocking=True):
        return self._lock.acquire(blocking, timeout=self.timeout)