class documentation

class ReadRWLock(object):

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:

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:

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):

Initialize the ReadRWLock object.

rwLock =

ReadWriteLock object.