class documentation
A lock object that allows many simultaneous "read locks", but only one "write lock."
| Method | __init__ |
Initialize the ReadWriteLock object. |
| Method | acquire |
Acquire a read lock. Blocks only if a thread has acquired the write lock. |
| Method | acquire |
Acquire a write lock. Blocks until there are no acquired read or write locks. |
| Method | release |
Release a read lock. |
| Method | release |
Release a write lock. |
| Instance Variable | _promote |
If True, then a reader thread can promote itself to a writer thread. |
| Instance Variable | _read |
Condition object to synchronize the read and write locks. |
| Instance Variable | _reader |
List of Reader thread IDs. |
| Instance Variable | _readers |
Number of readers. |
| Instance Variable | _writer |
List of Writer thread IDs. |
| Instance Variable | _writers |
Number of writers. |