summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentrun.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-02-25 15:46:32 +0100
committerQt CI Bot <qt_ci_bot@qt-project.org>2021-03-04 11:26:42 +0000
commit94d5c1bfe080380341fa6f7fe90c055225dfbd92 (patch)
treeec0b29f77dd908b701658d2b2825dd9a8217533f /src/concurrent/qtconcurrentrun.cpp
parent52f99ff3d202705beb0abb5251e3a4999f020545 (diff)
parent00b75e86f3db6eb25798a3edc45b4fb597b9ff74 (diff)
Merge "Remove win32_system_libs feature from src/corelib/configure.json"
Diffstat (limited to 'src/concurrent/qtconcurrentrun.cpp')
-rw-r--r--src/concurrent/qtconcurrentrun.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/concurrent/qtconcurrentrun.cpp b/src/concurrent/qtconcurrentrun.cpp
index 8347440b66..18bcf332ac 100644
--- a/src/concurrent/qtconcurrentrun.cpp
+++ b/src/concurrent/qtconcurrentrun.cpp
@@ -194,6 +194,11 @@
\snippet code/src_concurrent_qtconcurrentrun.cpp 11
+ \note There's no need to call QPromise::start() and QPromise::finish() to
+ indicate the beginning and the end of computation (like you would normally do when
+ using QPromise). QtConcurrent::run() will always call them before starting and
+ after finishing the execution.
+
\section2 Suspending and canceling the execution
The QPromise API also enables suspending and canceling the computation, if requested:
@@ -215,6 +220,10 @@
call to \c promise.isCanceled() will return \c true and
\c aFunction will return immediately without any further result reporting.
+ \note There's no need to call QPromise::finish() to stop the computation
+ after the cancellation (like you would normally do when using QPromise).
+ QtConcurrent::run() will always call it after finishing the execution.
+
\section2 Progress reporting
It's also possible to report the progress of a task