Docs for cache.ram.locker

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

Description


<type 'thread.lock'>


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
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.__enter__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
acquire([wait]) -> None or 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 None 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.acquire <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
acquire([wait]) -> None or 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 None 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]) -> None or 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 None 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.