Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.1.0
-
None
Description
QReadWriteLock::tryLockForRead() does not care about waiting writers. It returns true as long as no write lock is held.
On the other hand QReadWriteLock::tryLockForRead(int timeout) works as expected. It returns false if a writer is waiting and the timer has expired.
Possible solution:
change line 207 of qreawritelock.cpp from
if (d->accessCount < 0)
to
if ((d->accessCount < 0) || d->waitingWriters)