15 from threading
import Lock
16 from fasteners.process_lock
import InterProcessLock
17 from os.path
import exists
22 """ A combined process and thread lock. 25 path (str): path to the lockfile for the lock 34 self.
plock = InterProcessLock(path)
38 """ Acquire lock, locks thread and process lock. 41 blocking(bool): Set's blocking mode of acquire operation. 44 Returns: True if lock succeeded otherwise False 48 tlocked = self.tlock.acquire(blocking=
False)
52 plocked = self.plock.acquire(blocking=
False)
63 """ Release acquired lock. """ 68 """ Context handler, acquires lock in blocking mode. """ 73 """ Releases the lock. """
def __exit__(self, _type, value, traceback)
def acquire(self, blocking=True)