# EOMultiReaderLock class documentation

Generated at 2026-02-03 22:13:20 +0000
Software documentation for the EOMultiReaderLock class
EOControl/EOMultiReaderLock.h
WARNING !!! This class is in the middle of its initial experimental implementation Do not use it yet! But if you'd like to help implementing, please feel free. EOMultiReaderLock is a recursive lock which allows multiple threads to hold a lock for reading but only one thread to hold a lock for writing and only when all reading locks have been relinquished. Once thread requests for a lock to write further requests for a read lock are blocked until the write lock has been granted and relinquished again. But this only holds true if the thread requesting the reading lock does not already hold a reading lock in which case it is granted as it is assumed that this thread needs to continue to release the previously acquired lock or locks.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
lockForReading

Blocks until a lock for reading is obtained.

If the thread already holds this lock for reading or writing the method returns immediatly. All successful locks must be paired with corresponding unlocks.

lockForWriting

Blocks until a lock for writing is obtained.

If the thread already holds this lock for reading or writing the method returns immediatly. All successful locks must be paired with corresponding unlocks.

retrieveReaderLocks

Reenables the current registred locks.

This method blocks as long as a writer lock is held by another thread.

suspendReaderLocks

Disables the currently registered reader locks.

Subsequent calls may increment the count for it's thread but the lock is not reactivated.

tryLockForReading

Tries to obtain a lock for reading. Returns `NO` upon failure.

If the thread already holds this lock for reading or writing the method returns true. All successful locks must be paired with corresponding unlocks.

tryLockForWriting

Tries to obtain a lock for writing. Returns `NO` upon failure.

If the thread already holds this lock for reading or writing the method returns true. All successful locks must be paired with corresponding unlocks.

unlockForReading

Relinquishes obtained a previously obtained lock for reading.

If the thread already holds this lock for reading or writing the method returns immediatly. All successful locks must be paired with corresponding unlocks.

unlockForWriting

Relinquishes obtained a previously obtained lock for writing.

If the thread already holds this lock for reading or writing the method returns immediatly. All successful locks must be paired with corresponding unlocks.