Added locked() method to check lock state
This commit is contained in:
parent
e30956d761
commit
8e35ef2b29
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue