ReadWriteMutex
A writer-preferred non-reentrant read-write mutual exclusion lock.
This mutex allows multiple readers or a single writer to acquire the lock at the same time. It is non-reentrant for both readers (See below) and writers. It only supports ownership tracking for writeMutex.
If any coroutine calls writeMutex's Mutex.lock while the lock is already held by one or more readers, concurrent calls to readMutex's Mutex.lock will block until the writer has acquired (and released) the lock, to ensure that the lock eventually becomes available to the writer. Note that this prohibits recursive read-locking.
It is the responsibility of the caller to ensure that the mutex is unlocked by the same coroutine that locked it, and that it is not over-unlocked.
Types
Properties
Functions
Shortcut for ReadWriteMutex.writeMutex's Mutex.holdsLock.
Shortcut for ReadWriteMutex.readMutex's Mutex.lock.
Shortcut for ReadWriteMutex.readMutex's Mutex.unlock.
Shortcut for ReadWriteMutex.readMutex's Mutex.tryLock.
Shortcut for ReadWriteMutex.writeMutex's Mutex.tryLock.
Shortcut for ReadWriteMutex.readMutex's Mutex.holdsLock.
Shortcut for ReadWriteMutex.writeMutex's Mutex.withLock.
Shortcut for ReadWriteMutex.writeMutex's Mutex.lock.
Shortcut for ReadWriteMutex.writeMutex's Mutex.unlock.