Eidolon
|
Inherits object.
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) |
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.
def __init__ | ( | self | ) |
|
private |
|
static |
Returns the global locker object, instantiating it if necessary.
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.
|
static |
objLocks |
thisLock |