diff options
| author | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-06-10 17:38:27 +0200 |
|---|---|---|
| committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-07-06 08:30:54 +0000 |
| commit | 2ee9c074a2e69a8d73957bd8260717ccc1d7f2ac (patch) | |
| tree | d7d6816a1373a18f91ca6ab22645335f2cc1bcb7 /src/concurrent/qtconcurrentthreadengine.cpp | |
| parent | ca1e23773ec76c0ab75b4864598534c7e06a4bfe (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>
(cherry picked from commit 1bf75f2a661c05c7f1126187310d7df3f9704af5)
Diffstat (limited to 'src/concurrent/qtconcurrentthreadengine.cpp')
| -rw-r--r-- | src/concurrent/qtconcurrentthreadengine.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/concurrent/qtconcurrentthreadengine.cpp b/src/concurrent/qtconcurrentthreadengine.cpp index fcc504a96cc..399afb61953 100644 --- a/src/concurrent/qtconcurrentthreadengine.cpp +++ b/src/concurrent/qtconcurrentthreadengine.cpp @@ -176,39 +176,6 @@ void ThreadEngineBase::startSingleThreaded() finish(); } -void ThreadEngineBase::startBlocking() -{ - start(); - barrier.acquire(); - startThreads(); - - bool throttled = false; -#ifndef QT_NO_EXCEPTIONS - try { -#endif - while (threadFunction() == ThrottleThread) { - if (threadThrottleExit()) { - throttled = true; - break; - } - } -#ifndef QT_NO_EXCEPTIONS - } catch (QException &e) { - handleException(e); - } catch (...) { - handleException(QUnhandledException(std::current_exception())); - } -#endif - - if (throttled == false) { - barrier.release(); - } - - barrier.wait(); - finish(); - exceptionStore.throwPossibleException(); -} - void ThreadEngineBase::startThread() { startThreadInternal(); |
