| Qore Programming Language Reference Manual 2.2.0

Loading...
Searching...
No Matches
QC_RWLock.dox.h
1
2 namespace Qore {
4 namespace Thread {
6
40 class RWLock : public AbstractSmartLock {
41
42 public:
44
49 constructor();
50
51 public:
53
58 copy();
59
60 public:
62
71 destructor();
72
73 public:
75
85 int getReadWaiting();
86
87 public:
89
99 int getWriteWaiting();
100
101 public:
103
114 bool lockOwner();
115
116 public:
118
128 int numReaders();
129
130 public:
132
140nothing readLock();
141
142 public:
144
162 int readLock(timeout timeout_ms);
163
164 public:
166
177 bool readLockOwner();
178
179 public:
181
188nothing readUnlock();
189
190 public:
192
202 int tryReadLock();
203
204 public:
206
215 int tryWriteLock();
216
217 public:
219
237 int writeLock(timeout timeout_ms);
238
239 public:
241
249nothing writeLock();
250
251 public:
253
264 bool writeLockOwner();
265
266 public:
268
275nothing writeUnlock();
276};
277}
278}
Qore::Thread::AbstractSmartLock
The abstract base class for locks that support the internal API for use with the Condition class.
Definition QC_AbstractSmartLock.dox.h:15
Qore::Thread::RWLock
The RWLock class implements a read-write thread lock.
Definition QC_RWLock.dox.h:40
Qore::Thread::RWLock::writeLock
int writeLock(timeout timeout_ms)
Acquires the write lock with a timeout value; blocks if the read lock is already acquired by another ...
Qore::Thread::RWLock::readLock
int readLock(timeout timeout_ms)
Acquires the read lock with a timeout value; blocks if the write lock is already acquired by another ...
Qore::Thread::RWLock::writeLock
nothing writeLock()
Acquires the write lock; blocks if the read lock is already acquired by another thread.
Qore::Thread::RWLock::readUnlock
nothing readUnlock()
Decrements the read lock counter and releases the read lock if the counter is zero....
Qore::Thread::RWLock::tryWriteLock
int tryWriteLock()
Acquires the write lock only if it can be acquired immediately.
Qore::Thread::RWLock::constructor
constructor()
Creates the RWLock object.
Qore::Thread::RWLock::readLockOwner
bool readLockOwner()
Returns True if the current thread is holding the read lock, False if not.
Qore::Thread::RWLock::destructor
destructor()
Destroys the RWLock object.
Qore::Thread::RWLock::writeUnlock
nothing writeUnlock()
Releases the write lock, if any readers are waiting, wakes up all readers, otherwise if any writers a...
Qore::Thread::RWLock::numReaders
int numReaders()
Returns the read lock count.
Qore::Thread::RWLock::writeLockOwner
bool writeLockOwner()
Returns True if the current thread is holding the write lock, False if not.
Qore::Thread::RWLock::copy
copy()
Creates a new RWLock object, not based on the original.
Qore::Thread::RWLock::getWriteWaiting
int getWriteWaiting()
Returns the number of threads waiting on the write lock.
Qore::Thread::RWLock::getReadWaiting
int getReadWaiting()
Returns the number of threads waiting on the read lock.
Qore::Thread::RWLock::readLock
nothing readLock()
Acquires the read lock; blocks if the write lock is already acquired by another thread.
Qore::Thread::RWLock::tryReadLock
int tryReadLock()
Acquires the read lock only if it can be acquired immediately.
Qore::Thread::RWLock::lockOwner
bool lockOwner()
Returns True if the current thread is holding either the read lock or the write lock,...
Qore::Thread
Thread namespace.
Definition QC_AbstractSmartLock.dox.h:4
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3