Docs for cache.ram.locker

[ Python Tutorial ] [ Python Libraries ] [ web2py epydoc ]

Description


<type 'thread.lock'>











A lock object is a synchronization primitive.  To create a lock,
call the PyThread_allocate_lock() function. Methods are:

acquire() -- lock the lock, possibly blocking until it can be obtained
release() -- unlock of the lock
locked() -- test whether the lock is currently locked

A lock is not owned by the thread that locked it; another thread may
unlock it. A thread attempting to lock a lock that it has already locked
will block until another thread unlocks it. Deadlocks may ensue.


Attributes


cache.ram.locker.__class__ <type 'type'> extends (<type 'object'>,) belongs to class <type 'type'>
A lock object is a synchronization primitive. To create a lock, call the PyThread_allocate_lock() function. Methods are: acquire() -- lock the lock, possibly blocking until it can be obtained release() -- unlock of the lock locked() -- test whether the lock is currently locked A lock is not owned by the thread that locked it; another thread may unlock it. A thread attempting to lock a lock that it has already locked will block until another thread unlocks it. Deadlocks may ensue.

cache.ram.locker.__delattr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__delattr__('name') <==> del x.name

cache.ram.locker.__doc__ <type 'str'> belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.

cache.ram.locker.__enter__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
acquire([wait]) -> bool (acquire_lock() is an obsolete synonym) Lock the lock. Without argument, this blocks if the lock is already locked (even by the same thread), waiting for another thread to release the lock, and return True once the lock is acquired. With an argument, this will only block if the argument is true, and the return value reflects whether the lock is acquired. The blocking operation is not interruptible.

cache.ram.locker.__exit__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
release() (release_lock() is an obsolete synonym) Release the lock, allowing another thread that is blocked waiting for the lock to acquire the lock. The lock must be in the locked state, but it needn't be locked by the same thread that unlocks it.

cache.ram.locker.__format__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
default object formatter

cache.ram.locker.__getattribute__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__getattribute__('name') <==> x.name

cache.ram.locker.__hash__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__hash__() <==> hash(x)

cache.ram.locker.__init__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__init__(...) initializes x; see help(type(x)) for signature

cache.ram.locker.__new__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
T.__new__(S, ...) -> a new object with type S, a subtype of T

cache.ram.locker.__reduce__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
helper for pickle

cache.ram.locker.__reduce_ex__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
helper for pickle

cache.ram.locker.__repr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__repr__() <==> repr(x)

cache.ram.locker.__setattr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__setattr__('name', value) <==> x.name = value

cache.ram.locker.__sizeof__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
__sizeof__() -> int size of object in memory, in bytes

cache.ram.locker.__str__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__str__() <==> str(x)

cache.ram.locker.__subclasshook__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

cache.ram.locker.acquire <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
acquire([wait]) -> bool (acquire_lock() is an obsolete synonym) Lock the lock. Without argument, this blocks if the lock is already locked (even by the same thread), waiting for another thread to release the lock, and return True once the lock is acquired. With an argument, this will only block if the argument is true, and the return value reflects whether the lock is acquired. The blocking operation is not interruptible.

cache.ram.locker.acquire_lock <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
acquire([wait]) -> bool (acquire_lock() is an obsolete synonym) Lock the lock. Without argument, this blocks if the lock is already locked (even by the same thread), waiting for another thread to release the lock, and return True once the lock is acquired. With an argument, this will only block if the argument is true, and the return value reflects whether the lock is acquired. The blocking operation is not interruptible.

cache.ram.locker.locked <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
locked() -> bool (locked_lock() is an obsolete synonym) Return whether the lock is in the locked state.

cache.ram.locker.locked_lock <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
locked() -> bool (locked_lock() is an obsolete synonym) Return whether the lock is in the locked state.

cache.ram.locker.release <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
release() (release_lock() is an obsolete synonym) Release the lock, allowing another thread that is blocked waiting for the lock to acquire the lock. The lock must be in the locked state, but it needn't be locked by the same thread that unlocks it.

cache.ram.locker.release_lock <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
release() (release_lock() is an obsolete synonym) Release the lock, allowing another thread that is blocked waiting for the lock to acquire the lock. The lock must be in the locked state, but it needn't be locked by the same thread that unlocks it.