qt5base-lts/tests/auto/corelib/thread/qpromise
Sona Kurazyan 76a1c060ac Always cancel unfinished QPromises on destruction
If the QPromise is being destroyed, we should signal the associated
futures to stop waiting. No matter in which state the promise is, if
it's not finished, we should always cancel to avoid infinite waits.
This is also what docs state:

"The promise implicitly transitions to a canceled state on destruction
unless finish() is called beforehand by the user."

Fixes: QTBUG-101284
Pick-to: 6.3 6.2
Change-Id: I65ebfefe03b79b41afacda78a4f49938c54d8b37
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-25 08:05:12 +01:00
..
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
snippet_qpromise.cpp Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00
tst_qpromise.cpp Always cancel unfinished QPromises on destruction 2022-03-25 08:05:12 +01:00