class documentation

class ReadRWLock(object): (source)

Constructor: ReadRWLock(rwLock)

View In Hierarchy

Context Manager class for ReadWriteLock.

Method __enter__ Context Manager method to enter the block.
Method __exit__ Context Manager method to exit the block.
Method __init__ Initialize the ReadRWLock object.
Instance Variable rwLock ReadWriteLock object.
def __enter__(self) -> ReadRWLock: (source)

Context Manager method to enter the block.

This acquires a read lock. Blocks only if a thread has acquired the write lock.

Returns
ReadRWLockA ReadRWLock context manager object.
def __exit__(self, exc_type, exc_value, traceback) -> bool: (source)

Context Manager method to exit the block.

This releases a read lock.

Returns
boolFalse if exited due to an exception.
def __init__(self, rwLock: ReadWriteLock): (source)

Initialize the ReadRWLock object.

ReadWriteLock object.