summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentthreadengine.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <[email protected]>2020-06-02 10:48:06 +0200
committerSona Kurazyan <[email protected]>2020-06-04 22:32:43 +0200
commit37cfc3c6d2e3b290c7fc41cd7545283d24e4433c (patch)
tree91d3900ae5c113639467f3f47bd5217c42e29c2c /src/concurrent/qtconcurrentthreadengine.cpp
parent036c3c19e7da5f1a280750d3c68a0cff38678029 (diff)
Deprecate the pause-related APIs of QFuture* classes
Deprecated the pause-related APIs of QFuture* classes and added alternatives having "suspend" in the name instead. With 2f15927f01ceef0aca490746302a5ea57ea9441c new isSuspended()/suspended() APIs have been added to QFuture* classes for checking if pause/suspension is still in progress or it already took effect. To keep the naming more consistent, renamed: - setPaused() -> setSuspended() - pause() -> suspend() - togglePaused() -> toggleSuspended() - QFutureWatcher::paused() -> QFutureWatcher::suspending() Note that QFuture*::isPaused() now corresponds to (isSuspending() || isSuspended()). [ChangeLog][Deprecation Notice] Deprecated pause-related APIs of QFuture and QFutureWatcher. Added alternatives having "suspend" in the name instead. Change-Id: Ibeb75017a118401d64d18b72fb95d78e28c4661c Reviewed-by: MÃ¥rten Nordheim <[email protected]> Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Andrei Golubev <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
Diffstat (limited to 'src/concurrent/qtconcurrentthreadengine.cpp')
-rw-r--r--src/concurrent/qtconcurrentthreadengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/concurrent/qtconcurrentthreadengine.cpp b/src/concurrent/qtconcurrentthreadengine.cpp
index 7ea606f60b2..2c6e0526211 100644
--- a/src/concurrent/qtconcurrentthreadengine.cpp
+++ b/src/concurrent/qtconcurrentthreadengine.cpp
@@ -219,9 +219,9 @@ void ThreadEngineBase::acquireBarrierSemaphore()
barrier.acquire();
}
-void ThreadEngineBase::reportIfPausedDone() const
+void ThreadEngineBase::reportIfSuspensionDone() const
{
- if (futureInterface && futureInterface->isPaused())
+ if (futureInterface && futureInterface->isSuspending())
futureInterface->reportSuspended();
}
@@ -313,11 +313,11 @@ void ThreadEngineBase::run() // implements QRunnable.
if (threadThrottleExit()) {
return;
} else {
- // If the last worker thread is throttled and the state is paused,
- // it means that pause has been requested, and it is already
+ // If the last worker thread is throttled and the state is "suspending",
+ // it means that suspension has been requested, and it is already
// in effect (because all previous threads have already exited).
// Report the "Suspended" state.
- reportIfPausedDone();
+ reportIfSuspensionDone();
}
}