qt5base-lts/tests/auto
David Faure a9b6a78e54 QThreadPool: fix race at time of thread expiry.
The current synchronization mechanism was racy: decrementing waitingThreads
and then hoping that the wakeOne will wake a thread before its expiry
timeout happens. In other words, on timeout, a just-assigned task would
never run. And then no other task would run, if maxThreadCount is reached.

Fixed by using a queue of waiting threads (rather than just a count), and by
moving the wait condition into the thread itself, so we know precisely
which one we're waking up, and we can remove it from the set of waiting threads
before waking it up, and therefore it can determine on wakeup whether it
has work to do (caller removed it from the queue) or it expired (it's still
in the queue). This is reliable, whereas the return value from QWaitCondition::wait
isn't reliable, when the main thread has already decided that this thread
has work to do.

Task-number: QTBUG-3786
Change-Id: I1eac5d6c309daed7f483ac7a8074297bfda6ee32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-10-31 17:45:58 +01:00
..
android Enabling CI usage for runtests_androiddeployqt.pl 2013-10-20 09:37:33 +02:00
bic/data test: Add 5.1.0 bic data for linux-gcc-ia32 2013-07-08 21:47:36 +02:00
cmake Teach CMake about Qt 5 plugins. 2013-09-10 14:38:18 +02:00
compilerwarnings/data
concurrent QtConcurrent tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:25 +01:00
corelib QThreadPool: fix race at time of thread expiry. 2013-10-31 17:45:58 +01:00
dbus don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
gui Introduce QTextDocument::baseUrl 2013-10-25 14:18:05 +02:00
guiapplauncher
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network Merge remote-tracking branch 'origin/stable' into dev 2013-10-24 12:48:42 +02:00
opengl Fixed tst_qgl for fullscreen platforms 2013-08-07 09:01:36 +02:00
other don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
printsupport QPrintSupport: Move QAbstractPrintDialog test into QPrintSupport 2013-10-26 00:39:51 +02:00
shared
sql Fix a bug in QSqlQuery::isNull documentation 2013-10-22 17:05:47 +02:00
testlib Merge remote-tracking branch 'origin/stable' into dev 2013-10-24 12:48:42 +02:00
tools Add JSON parsing support to qmake. 2013-10-17 08:07:25 +02:00
widgets added QAbstractSpinBox::setGroupSeparatorShown function. 2013-10-29 12:12:16 +01:00
xml Add explanation to QEXPECT_FAIL statements 2013-10-17 09:50:58 +02:00
auto.pro exclude gui-needing tests from -no-gui build 2013-10-18 20:05:27 +02:00
network-settings.h network test settings: support newer FTP server versions 2013-08-28 12:45:34 +02:00
qtest-config.h
test.pl Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00