42 #include "qplatformdefs.h" 169 "Overflow in lock counter");
212 "Overflow in lock counter");
260 "Overflow in lock counter");
298 "Overflow in lock counter");
338 "Overflow in lock counter");
350 "Overflow in lock counter");
385 "Overflow in lock counter");
403 "Overflow in lock counter");
422 bool unlocked =
false;
429 if (--it.
value() <= 0)
620 #endif // QT_NO_THREAD
QWaitCondition readerWait
#define QT_END_NAMESPACE
This macro expands to.
void unlock()
Unlocks the lock.
#define it(className, varName)
RecursionMode
QReadWriteLock multiple times and the mutex won't be unlocked until a corresponding number of unlock(...
bool tryLockForWrite()
Attempts to lock for writing.
QWaitCondition writerWait
void lockForWrite()
Locks the lock for writing.
The QHash class is a template class that provides a hash-table-based dictionary.
const T value(const Key &key) const
Returns the value associated with the key.
bool tryLockForRead()
Attempts to lock for reading.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QReadWriteLockPrivate * d
#define QT_BEGIN_NAMESPACE
This macro expands to.
~QReadWriteLock()
Destroys the QReadWriteLock object.
void lockForRead()
Locks the lock for reading.
bool wait(QMutex *mutex, unsigned long time=ULONG_MAX)
#define Q_ASSERT_X(cond, where, what)
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the hash...
QReadWriteLock()
Constructs a QReadWriteLock object in NonRecursive mode.
static QReadWriteLock lock
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
QHash< Qt::HANDLE, int > currentReaders
iterator erase(iterator it)
Removes the (key, value) pair associated with the iterator pos from the hash, and returns an iterator...
static Qt::HANDLE currentThreadId()
Returns the thread handle of the currently executing thread.