 |
Qore Programming Language Reference Manual
0.9.4.6
|
The RWLock class implements a read-write thread lock.
Definition: QC_RWLock.dox.h:40
constructor()
Creates the RWLock object.
nothing writeLock()
Acquires the write lock; blocks if the read lock is already acquired by another thread.
bool lockOwner()
Returns True if the current thread is holding either the read lock or the write lock,...
int tryReadLock()
Acquires the read lock only if it can be acquired immediately.
nothing writeUnlock()
Releases the write lock, if any readers are waiting, wakes up all readers, otherwise if any writers a...
copy()
Creates a new RWLock object, not based on the original.
int readLock(timeout timeout_ms)
Acquires the read lock with a timeout value; blocks if the write lock is already acquired by another ...
nothing readLock()
Acquires the read lock; blocks if the write lock is already acquired by another thread.
bool writeLockOwner()
Returns True if the current thread is holding the write lock, False if not.
nothing readUnlock()
Decrements the read lock counter and releases the read lock if the counter is zero....
int tryWriteLock()
Acquires the write lock only if it can be acquired immediately.
bool readLockOwner()
Returns True if the current thread is holding the read lock, False if not.
The abstract base class for locks that support the internal API for use with the Condition class.
Definition: QC_AbstractSmartLock.dox.h:15
int numReaders()
Returns the read lock count.
int writeLock(timeout timeout_ms)
Acquires the write lock with a timeout value; blocks if the read lock is already acquired by another ...
destructor()
Destroys the RWLock object.
int getReadWaiting()
Returns the number of threads waiting on the read lock.
int getWriteWaiting()
Returns the number of threads waiting on the write lock.
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3