diff options
| author | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-06-10 17:38:27 +0200 |
|---|---|---|
| committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-06-14 11:52:36 +0200 |
| commit | 1bf75f2a661c05c7f1126187310d7df3f9704af5 (patch) | |
| tree | b218904f1b4da6e7ae59627af302a49c8c042d0e /src/concurrent/qtconcurrentthreadengine.h | |
| parent | 7dd4c937489451e72a671784dcd353e4c5bc16df (diff) | |
Remove the dead code for blocking methods from QtConcurrent
After 79fd1cb2c631b6084bf10874205d27f5b53c907a the methods for running
QtConcurrent algorithms in the blocking mode aren't used anymore. Since
ThreadEngineBase and ThreadEngineStarter classes aren't meant to be used
externally, it should be fine to remove startBlocking() methods now.
Removed the unused code and adjusted the tests accordingly.
Change-Id: Ifb13820ce207869d6f720bcb5be8d35bb355fe33
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/concurrent/qtconcurrentthreadengine.h')
| -rw-r--r-- | src/concurrent/qtconcurrentthreadengine.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h index 4cd5b852107..5a78377e71a 100644 --- a/src/concurrent/qtconcurrentthreadengine.h +++ b/src/concurrent/qtconcurrentthreadengine.h @@ -91,7 +91,6 @@ public: ThreadEngineBase(QThreadPool *pool); virtual ~ThreadEngineBase(); void startSingleThreaded(); - void startBlocking(); void startThread(); bool isCanceled(); void waitForResume(); @@ -154,15 +153,6 @@ public: } // Runs the user algorithm using multiple threads. - // This function blocks until the algorithm is finished, - // and then returns the result. - T *startBlocking() - { - ThreadEngineBase::startBlocking(); - return result(); - } - - // Runs the user algorithm using multiple threads. // Does not block, returns a future. QFuture<T> startAsynchronously() { @@ -242,13 +232,6 @@ class ThreadEngineStarter : public ThreadEngineStarterBase<T> public: ThreadEngineStarter(TypedThreadEngine *eng) : Base(eng) { } - - T startBlocking() - { - T t = *this->threadEngine->startBlocking(); - delete this->threadEngine; - return t; - } }; // Full template specialization where T is void. @@ -258,12 +241,6 @@ class ThreadEngineStarter<void> : public ThreadEngineStarterBase<void> public: ThreadEngineStarter(ThreadEngine<void> *_threadEngine) : ThreadEngineStarterBase<void>(_threadEngine) {} - - void startBlocking() - { - this->threadEngine->startBlocking(); - delete this->threadEngine; - } }; //! [qtconcurrentthreadengine-1] |
