From 1bf75f2a661c05c7f1126187310d7df3f9704af5 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Thu, 10 Jun 2021 17:38:27 +0200 Subject: Remove the dead code for blocking methods from QtConcurrent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Andrei Golubev --- src/concurrent/qtconcurrentthreadengine.cpp | 33 ----------------------------- 1 file changed, 33 deletions(-) (limited to 'src/concurrent/qtconcurrentthreadengine.cpp') 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(); -- cgit v1.2.3