qt5base-lts/tests
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
..
auto QThreadPool: fix race at time of thread expiry. 2013-10-31 17:45:58 +01:00
baselineserver WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
benchmarks Merge remote-tracking branch 'origin/stable' into dev 2013-10-24 12:48:42 +02:00
global tst_bic: Add linux-gcc-ia32 bic data for QtXml 2013-01-16 08:25:28 +01:00
manual Add widget replace function to QLayout 2013-09-21 23:17:55 +02:00
shared WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
README Doc: Fix references to Qt Test 2013-01-30 01:35:06 +01:00
tests.pro Properly implement a 'make docs' target for subdirs and apps/libs 2012-05-09 08:34:42 +02:00

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.