diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-10-12 11:11:38 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-12-20 15:38:57 (GMT) |
commit | 9a18739c538013a7f2111e68e9255379cfbd9a57 (patch) | |
tree | 37c2db6266e6337d2df9cb59aa3a1ba9e3c72da3 /src/corelib/thread/qmutex_win.cpp | |
parent | 00c4e6d3d4e9196dc1c418c9269fcbed2f49dc87 (diff) | |
download | Qt-9a18739c538013a7f2111e68e9255379cfbd9a57.zip Qt-9a18739c538013a7f2111e68e9255379cfbd9a57.tar.gz Qt-9a18739c538013a7f2111e68e9255379cfbd9a57.tar.bz2 |
Ensure that every thread does contend in the contention tests
2 semaphore barrier is not enough to ensure that every thread does run
as part of the benchmark. It is possible that a single thread, given
enough time, could do all the work while the other threads remain
dormant. Prevent this by making sure that the each thread rendevous with
both the semaphore barriers at the start of their run(), yields after
unlocking, and then rendevous again at the end.
Reviewed-by: joao
Diffstat (limited to 'src/corelib/thread/qmutex_win.cpp')
0 files changed, 0 insertions, 0 deletions