qt5base-lts/tests/auto/corelib/thread
Ivan Solovev a8261e327d QPromise: improve documentation snippet
The multi-thread snippet in the documentation, when copied as is,
could actually crash because of the race condition between the main
thread and the thread that generate results for the promise.
This is fixed by explicitly calling QPromise::start().
Actually, the underlying snippet already has this call, it just was
not included in the documentation.

This patch modifies the documentation snippet to include calls to
both QPromise::start() and QPromise::finish().

Fixes: QTBUG-109230
Pick-to: 6.5 6.4 6.2
Change-Id: Ic25f31a6b3b16ba6bc06a0b199289c8c5d50bab6
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
2023-01-09 10:03:48 +01:00
..
qatomicint tst_QAtomicInt:fetchAndAdd(): remove two duplicate data rows 2022-10-17 15:53:32 +02:00
qatomicinteger Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qatomicpointer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qfuture Fix crash when cancelling a QFuture that has continuation with context 2023-01-06 14:00:56 +00:00
qfuturesynchronizer Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qfuturewatcher Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qmutex Remove preprocessor conditionals for chrono include 2022-09-16 08:09:05 +02:00
qmutexlocker Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qpromise QPromise: improve documentation snippet 2023-01-09 10:03:48 +01:00
qreadlocker Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qreadwritelock Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qresultstore Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qsemaphore Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qthread Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qthreadonce Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qthreadpool Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qthreadstorage Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qwaitcondition Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qwritelocker Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
CMakeLists.txt tests: fix build with -no-feature-concurrent 2022-11-09 20:33:49 +01:00