Eidolon
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
ObjectLocker Class Reference

Inherits object.

Collaboration diagram for ObjectLocker:
Collaboration graph

Public Member Functions

def __init__ (self)
 
def getLock (self, obj)
 

Static Public Member Functions

def getGlobalLocker ()
 

Public Attributes

 objLocks
 
 thisLock
 

Static Public Attributes

 globalLocker
 

Private Member Functions

def _removeLock (self, obj)
 

Detailed Description

This maintains a dictionary relating weak references to threading.RLock objects. This allows a lock to be associated
uniquely with any provided object compatible with the weakref interface. The method getLock() returns the lock for
the provided object, creating one if needed. When the object is removed the associated lock is also removed from
the dictonary. The global instance `globalLocker` is created to provide a global default lock for the decorators
which rely on this type.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Member Function Documentation

◆ _removeLock()

def _removeLock (   self,
  obj 
)
private
Here is the caller graph for this function:

◆ getGlobalLocker()

def getGlobalLocker ( )
static
Returns the global locker object, instantiating it if necessary.

◆ getLock()

def getLock (   self,
  obj 
)
Get a threading.RLock object uniquely associated with `obj'. If this method is subsequently called with the
same object, the same lock is returned. When `obj' is removed by the collector, the lock will also be removed.
Here is the call graph for this function:

Member Data Documentation

◆ globalLocker

globalLocker
static

◆ objLocks

objLocks

◆ thisLock

thisLock

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