summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-10-14 10:37:57 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-10-19 13:25:01 +0000
commit46078f33745659ec1770cb4a58f8e02b5a9f670b (patch)
tree72dac0bc7c206a61149becc3e478a814334554e3 /tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
parent8249f490ff82ee2a223d2c64661cfcb1c24bdeb4 (diff)
QOrderedMutexLocker: unlock in reverse order of locking
This is an improvement for the following reasons: - Should mutex locking allocate any kind of resource, unlocking in reverse order will free those resources in inverse order, which helps typical allocators. - If the lock pair is contended, by unlocking in the same order as locking, we were allowing the waiting thread to wake up to take the first lock just to find that the second lock is still held by someone else. The order of unlocking has no influence on the correct- ness of the algorithm. Change-Id: Id16b0342aef325c14a7bd8836d3a75db68ef2588 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/gui/kernel/qwindow/tst_qwindow.cpp')
0 files changed, 0 insertions, 0 deletions