template<class ATOMIC_OP, class MUTEX, class SEMAPHORE>
class bslmt::ReaderWriterMutexImpl< ATOMIC_OP, MUTEX, SEMAPHORE >
This class provides a multi-reader/single-writer lock mechanism.
See bslmt_readerwritermuteximpl
template<class ATOMIC_OP , class MUTEX , class SEMAPHORE >
Lock this reader-writer mutex for reading. If there are no active or pending write locks, lock this mutex for reading and return immediately. Otherwise, block until the read lock on this mutex is acquired. Use unlockRead or unlock to release the lock on this mutex. The behavior is undefined if this method is called from a thread that already has a lock on this mutex.
template<class ATOMIC_OP , class MUTEX , class SEMAPHORE >
Lock this reader-writer mutex for writing. If there are no active or pending locks on this mutex, lock this mutex for writing and return immediately. Otherwise, block until the write lock on this mutex is acquired. Use unlockWrite or unlock to release the lock on this mutex. The behavior is undefined if this method is called from a thread that already has a lock on this mutex.
template<class ATOMIC_OP , class MUTEX , class SEMAPHORE >
Attempt to lock this reader-writer mutex for reading. Immediately return 0 on success, and a non-zero value if there are active or pending writers. If successful, unlockRead or unlock must be used to release the lock on this mutex. The behavior is undefined if this method is called from a thread that already has a lock on this mutex.
template<class ATOMIC_OP , class MUTEX , class SEMAPHORE >
Attempt to lock this reader-writer mutex for writing. Immediately return 0 on success, and a non-zero value if there are active or pending locks on this mutex. If successful, unlockWrite or unlock must be used to release the lock on this mutex. The behavior is undefined if this method is called from a thread that already has a lock on this mutex.