summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentthreadengine.h
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2020-05-20 11:39:39 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2020-05-29 16:58:43 +0200
commit2f15927f01ceef0aca490746302a5ea57ea9441c (patch)
treec4978b801a1e7db5b63fd091182fff2394a36b7f /src/concurrent/qtconcurrentthreadengine.h
parent9b0e23ef8a915a8c58808fa356f771ecdb6f020c (diff)
Add a way of notifying QFutureWatcher when pause is in effect
Because setting QFutureInterface to paused state does not mean that the computations that are already in progress will stop immediately, it may be useful to get notified when pause actually takes effect. Introduced the QFutureWatcher::suspended() signal, to be emitted when there are no more computations in progress, and no more result ready or progress reporting signals will be emitted, i.e. when pause took effect. Added {QFuture, QFutureWatcher}::isSuspended() methods for checking if pause took effect. QtConcurrent will now to send QFutureCallOutEvent::Suspended event when the state is paused and there are no more active threads. [ChangeLog][QtCore][QFutureWatcher] Added a new QFutureWatcher::suspended() signal, to be emitted when pause took effect, meaning that there are no more computations in progress. Added {QFuture, QFutureWatcher}::isSuspended() methods for checking if pause took effect. Fixes: QTBUG-12152 Change-Id: I88f2ad24d800cd6293dec63977d45bd35f9a09f0 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/concurrent/qtconcurrentthreadengine.h')
-rw-r--r--src/concurrent/qtconcurrentthreadengine.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h
index eb11c34c06..4e7e8d0b81 100644
--- a/src/concurrent/qtconcurrentthreadengine.h
+++ b/src/concurrent/qtconcurrentthreadengine.h
@@ -99,6 +99,7 @@ public:
void setProgressValue(int progress);
void setProgressRange(int minimum, int maximum);
void acquireBarrierSemaphore();
+ void reportIfPausedDone() const;
protected: // The user overrides these:
virtual void start() {}