qt5base-lts/tests/auto/corelib/thread
Sona Kurazyan d7d6a1fe32 Don't queue events in QFutureWatcher when pause is requested
When QFutureWatcher (or QFutureInterface) is paused, it doesn't
mean that it will take effect immediately: the pending tasks may
still be in progress and keep reporting results. At the moment
QFutureWatcher will queue those events and report only with the
next resume. This behavior is wrong, QFutureWatcher should not
decide when to report events, the sender should decide when is the
right time. There's no benefit in reporting already happened events
with delay. Because of this, even the pause event itself was being
reported after resume.

Fixed the behavior by removing the logic of queueing events when
the state is set to "paused". It seems unlikely that the users of
QFutureWatcher rely on reporting events with delay.

[ChangeLog][Important Behavior Changes][QtCore] QFutureWatcher will not
immediately stop delivering progress and result ready signals when the
future is paused. At the moment of pausing there may be still computations
that are in progress and cannot be stopped. Signals for such computations
will be still delivered after pause, instead of being postponed and
reported only after next resume.

Fixes: QTBUG-12152
Change-Id: I9f0b545ac096578c52cc72d60575c018c01e3368
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-05-27 11:53:28 +02:00
..
qatomicint Merge remote-tracking branch 'origin/dev' into wip/cmake 2019-11-19 13:53:21 +01:00
qatomicinteger cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
qatomicpointer Merge remote-tracking branch 'origin/dev' into wip/cmake 2019-11-19 13:53:21 +01:00
qfuture Add support of cancellation handler callbacks to QFuture 2020-05-15 22:35:30 +02:00
qfuturesynchronizer cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
qfuturewatcher Don't queue events in QFutureWatcher when pause is requested 2020-05-27 11:53:28 +02:00
qmutex Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qmutexlocker cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
qreadlocker cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
qreadwritelock cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
qresultstore Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qsemaphore Merge remote-tracking branch 'origin/dev' into wip/cmake 2020-01-29 16:57:27 +01:00
qthread Regenerate tests/auto/corelib/thread 2019-11-12 17:25:29 +00:00
qthreadonce cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
qthreadpool Merge remote-tracking branch 'origin/5.15' into dev 2020-02-13 18:31:40 +01:00
qthreadstorage Post merge fixes 2019-11-25 14:53:27 +00:00
qwaitcondition cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
qwritelocker cmake: add more tests in corelib/thread 2019-10-04 06:27:19 +00:00
CMakeLists.txt cmake: add corelib/thread/qthreadstorage 2019-10-10 12:10:27 +00:00
thread.pro Re-enable thread autotests 2018-09-25 22:35:40 +00:00