Qudi
Public Member Functions | Public Attributes | List of all members
core.util.mutex.Mutex Class Reference

Extends QMutex (which serves as access serialization between threads). More...

Inheritance diagram for core.util.mutex.Mutex:
Inheritance graph
[legend]
Collaboration diagram for core.util.mutex.Mutex:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, args, kargs)
 
def tryLock (self, timeout=None, id=None)
 Try to lock the mutex. More...
 
def lock (self, id=None)
 Lock mutex. More...
 
def unlock (self)
 Unlock mutex.
 
def acquire (self, blocking=True)
 Mimics threading.Lock.acquire() to allow this class as a drop-in replacement.
 
def release (self)
 Mimics threading.Lock.release() to allow this class as a drop-in replacement.
 
def depth (self)
 Depth of traceback. More...
 
def traceback (self)
 Get traceback. More...
 
def __exit__ (self, args)
 Exit context. More...
 
def __enter__ (self)
 Enter context. More...
 

Public Attributes

 l
 
 tb
 
 debug
 

Detailed Description

Extends QMutex (which serves as access serialization between threads).

This class provides:

Member Function Documentation

◆ __enter__()

def core.util.mutex.Mutex.__enter__ (   self)

Enter context.

Parameters
argscontext arguments
Returns
QMutex: this mutex

◆ __exit__()

def core.util.mutex.Mutex.__exit__ (   self,
  args 
)

Exit context.

Parameters
argscontext arguments

◆ depth()

def core.util.mutex.Mutex.depth (   self)

Depth of traceback.

Returns
int: depth of traceback

◆ lock()

def core.util.mutex.Mutex.lock (   self,
  id = None 
)

Lock mutex.

Will try again every 5 seconds.

       @param id: debug id

◆ traceback()

def core.util.mutex.Mutex.traceback (   self)

Get traceback.

Returns
list: traceback

◆ tryLock()

def core.util.mutex.Mutex.tryLock (   self,
  timeout = None,
  id = None 
)

Try to lock the mutex.

Parameters
timeoutint: give up after this many milliseconds
iddebug id
Returns
bool: whether locking succeeded

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