Public Member Functions | Public Attributes | List of all members
mycroft.util.combo_lock.ComboLock Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

def mycroft.util.combo_lock.ComboLock.__init__ (   self,
  path 
)

Definition at line 27 of file combo_lock.py.

Member Function Documentation

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.

Member Data Documentation

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.


The documentation for this class was generated from the following file:


mycroft_ros
Author(s):
autogenerated on Mon Apr 26 2021 02:35:41