Public Member Functions | |
def | __enter__ (self) |
def | __exit__ (self, _type, value, traceback) |
def | __init__ (self, path) |
def | acquire (self, blocking=True) |
def | release (self) |
Public Attributes | |
plock | |
tlock | |
A combined process and thread lock. Arguments: path (str): path to the lockfile for the lock
Definition at line 21 of file combo_lock.py.
def mycroft.util.combo_lock.ComboLock.__init__ | ( | self, | |
path | |||
) |
Definition at line 27 of file combo_lock.py.
def mycroft.util.combo_lock.ComboLock.__enter__ | ( | self | ) |
Context handler, acquires lock in blocking mode.
Definition at line 67 of file combo_lock.py.
def mycroft.util.combo_lock.ComboLock.__exit__ | ( | self, | |
_type, | |||
value, | |||
traceback | |||
) |
Releases the lock.
Definition at line 72 of file combo_lock.py.
def mycroft.util.combo_lock.ComboLock.acquire | ( | self, | |
blocking = True |
|||
) |
Acquire lock, locks thread and process lock. Arguments: blocking(bool): Set's blocking mode of acquire operation. Default True. Returns: True if lock succeeded otherwise False
Definition at line 37 of file combo_lock.py.
def mycroft.util.combo_lock.ComboLock.release | ( | self | ) |
Release acquired lock.
Definition at line 62 of file combo_lock.py.
mycroft.util.combo_lock.ComboLock.plock |
Definition at line 34 of file combo_lock.py.
mycroft.util.combo_lock.ComboLock.tlock |
Definition at line 35 of file combo_lock.py.