![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtConcurrent More...
#include <qtconcurrentthreadengine.h>
Inheritance diagram for QtConcurrent::ThreadEngineBase:
Collaboration diagram for QtConcurrent::ThreadEngineBase:Public Member Functions | |
| ThreadEngineBase (QThreadPool *pool) | |
| virtual | ~ThreadEngineBase () |
| void | startSingleThreaded () |
| void | startThread () |
| bool | isCanceled () |
| void | waitForResume () |
| bool | isProgressReportingEnabled () |
| void | setProgressValue (int progress) |
| void | setProgressRange (int minimum, int maximum) |
| void | acquireBarrierSemaphore () |
| void | reportIfSuspensionDone () const |
Public Member Functions inherited from QRunnable | |
| virtual void | run ()=0 |
| Implement this pure virtual function in your subclass. | |
| constexpr | QRunnable () noexcept=default |
| Constructs a QRunnable. | |
| virtual | ~QRunnable () |
| QRunnable virtual destructor. | |
| bool | autoDelete () const |
Returns true is auto-deletion is enabled; false otherwise. | |
| void | setAutoDelete (bool autoDelete) |
| Enables auto-deletion if autoDelete is true; otherwise auto-deletion is disabled. | |
| template<typename Callable , if_callable< Callable > = true> | |
| QGenericRunnable (Callable &&c) | |
| ~QGenericRunnable () override | |
| void | run () override |
Protected Member Functions | |
| virtual void | start () |
| virtual void | finish () |
| virtual ThreadFunctionResult | threadFunction () |
| virtual bool | shouldStartThread () |
| virtual bool | shouldThrottleThread () |
Protected Attributes | |
| QFutureInterfaceBase * | futureInterface |
| QThreadPool * | threadPool |
| ThreadEngineBarrier | barrier |
| QtPrivate::ExceptionStore | exceptionStore |
| QBasicMutex | mutex |
Private Member Functions | |
| void | run () override |
| Implement this pure virtual function in your subclass. | |
| virtual void | asynchronousFinish ()=0 |
Additional Inherited Members | |
Public Types inherited from QRunnable | |
| template<typename Callable > | |
| using | if_callable = std::enable_if_t< std::is_invocable_r_v< void, Callable >, bool > |
Static Public Member Functions inherited from QRunnable | |
| template<typename Callable , if_callable< Callable > = true> | |
| static QRunnable * | create (Callable &&functionToRun) |
| static QRunnable * | create (std::nullptr_t)=delete |
\inmodule QtConcurrent
Definition at line 51 of file qtconcurrentthreadengine.h.
| QtConcurrent::ThreadEngineBase::ThreadEngineBase | ( | QThreadPool * | pool | ) |
Definition at line 133 of file qtconcurrentthreadengine.cpp.
References QRunnable::setAutoDelete().
Here is the call graph for this function:
|
virtual |
Definition at line 139 of file qtconcurrentthreadengine.cpp.
| void QtConcurrent::ThreadEngineBase::acquireBarrierSemaphore | ( | ) |
Definition at line 154 of file qtconcurrentthreadengine.cpp.
References QtConcurrent::ThreadEngineBarrier::acquire(), and barrier.
Referenced by QtConcurrent::ThreadEngine< T >::startAsynchronously().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatepure virtual |
|
inlineprotectedvirtual |
Reimplemented in QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >, QtConcurrent::FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >, and QtConcurrent::MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >.
Definition at line 69 of file qtconcurrentthreadengine.h.
Referenced by QtConcurrent::ThreadEngine< T >::asynchronousFinish(), and startSingleThreaded().
Here is the caller graph for this function:| bool QtConcurrent::ThreadEngineBase::isCanceled | ( | ) |
Definition at line 165 of file qtconcurrentthreadengine.cpp.
References futureInterface, and QFutureInterfaceBase::isCanceled().
Referenced by QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction(), and run().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QtConcurrent::ThreadEngineBase::isProgressReportingEnabled | ( | ) |
Definition at line 179 of file qtconcurrentthreadengine.cpp.
References futureInterface.
Referenced by QtConcurrent::IterateKernel< Iterator, T >::start().
Here is the caller graph for this function:| void QtConcurrent::ThreadEngineBase::reportIfSuspensionDone | ( | ) | const |
Definition at line 159 of file qtconcurrentthreadengine.cpp.
References futureInterface, QFutureInterfaceBase::isSuspending(), and QFutureInterfaceBase::reportSuspended().
Referenced by run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
Implement this pure virtual function in your subclass.
Implements QRunnable.
Definition at line 233 of file qtconcurrentthreadengine.cpp.
References e, isCanceled(), reportIfSuspensionDone(), threadFunction(), and QtConcurrent::ThrottleThread.
Here is the call graph for this function:| void QtConcurrent::ThreadEngineBase::setProgressRange | ( | int | minimum, |
| int | maximum | ||
| ) |
Definition at line 191 of file qtconcurrentthreadengine.cpp.
References futureInterface, and QFutureInterfaceBase::setProgressRange().
Referenced by QtConcurrent::IterateKernel< Iterator, T >::start().
Here is the call graph for this function:
Here is the caller graph for this function:| void QtConcurrent::ThreadEngineBase::setProgressValue | ( | int | progress | ) |
Definition at line 185 of file qtconcurrentthreadengine.cpp.
References futureInterface, and QFutureInterfaceBase::setProgressValue().
Referenced by QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Reimplemented in QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >, QtConcurrent::FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >, QtConcurrent::IterateKernel< Iterator, T >, QtConcurrent::IterateKernel< Iterator, QtPrivate::MapResultType< Iterator, MapFunctor > >, QtConcurrent::IterateKernel< Iterator, qValueType< Iterator >::value_type >, QtConcurrent::IterateKernel< Iterator, ReducedResultType >, QtConcurrent::IterateKernel< Iterator, void >, QtConcurrent::IterateKernel< Sequence::const_iterator, void >, and QtConcurrent::MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >.
Definition at line 71 of file qtconcurrentthreadengine.h.
|
inlineprotectedvirtual |
Reimplemented in QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >, QtConcurrent::FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >, and QtConcurrent::MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >.
Definition at line 72 of file qtconcurrentthreadengine.h.
Referenced by QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction(), QtConcurrent::IterateKernel< Iterator, T >::shouldStartThread(), QtConcurrent::FilterKernel< Sequence, KeepFunctor, ReduceFunctor >::shouldThrottleThread(), QtConcurrent::FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >::shouldThrottleThread(), QtConcurrent::MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >::shouldThrottleThread(), and QtConcurrent::IterateKernel< Iterator, T >::whileThreadFunction().
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Reimplemented in QtConcurrent::FilteredEachKernel< Iterator, KeepFunctor >, QtConcurrent::IterateKernel< Iterator, T >, QtConcurrent::IterateKernel< Iterator, QtPrivate::MapResultType< Iterator, MapFunctor > >, QtConcurrent::IterateKernel< Iterator, qValueType< Iterator >::value_type >, QtConcurrent::IterateKernel< Iterator, ReducedResultType >, QtConcurrent::IterateKernel< Iterator, void >, and QtConcurrent::IterateKernel< Sequence::const_iterator, void >.
Definition at line 68 of file qtconcurrentthreadengine.h.
Referenced by QtConcurrent::ThreadEngine< T >::startAsynchronously(), and startSingleThreaded().
Here is the caller graph for this function:| void QtConcurrent::ThreadEngineBase::startSingleThreaded | ( | ) |
Definition at line 141 of file qtconcurrentthreadengine.cpp.
References finish(), start(), QtConcurrent::ThreadFinished, and threadFunction().
Referenced by QtConcurrent::ThreadEngine< T >::startSingleThreaded().
Here is the call graph for this function:
Here is the caller graph for this function:| void QtConcurrent::ThreadEngineBase::startThread | ( | ) |
Definition at line 149 of file qtconcurrentthreadengine.cpp.
Referenced by QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction(), and QtConcurrent::IterateKernel< Iterator, T >::whileThreadFunction().
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Reimplemented in QtConcurrent::IterateKernel< Iterator, T >, QtConcurrent::IterateKernel< Iterator, QtPrivate::MapResultType< Iterator, MapFunctor > >, QtConcurrent::IterateKernel< Iterator, qValueType< Iterator >::value_type >, QtConcurrent::IterateKernel< Iterator, ReducedResultType >, QtConcurrent::IterateKernel< Iterator, void >, and QtConcurrent::IterateKernel< Sequence::const_iterator, void >.
Definition at line 70 of file qtconcurrentthreadengine.h.
References QtConcurrent::ThreadFinished.
Referenced by run(), and startSingleThreaded().
Here is the caller graph for this function:| void QtConcurrent::ThreadEngineBase::waitForResume | ( | ) |
Definition at line 173 of file qtconcurrentthreadengine.cpp.
References futureInterface, and QFutureInterfaceBase::waitForResume().
Referenced by QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction(), and QtConcurrent::IterateKernel< Iterator, T >::whileThreadFunction().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 91 of file qtconcurrentthreadengine.h.
Referenced by acquireBarrierSemaphore().
|
protected |
Definition at line 92 of file qtconcurrentthreadengine.h.
|
protected |
Definition at line 89 of file qtconcurrentthreadengine.h.
Referenced by QtConcurrent::ThreadEngine< T >::futureInterfaceTyped(), isCanceled(), isProgressReportingEnabled(), reportIfSuspensionDone(), QtConcurrent::ThreadEngine< T >::reportResult(), QtConcurrent::ThreadEngine< T >::reportResults(), setProgressRange(), setProgressValue(), QtConcurrent::FilteredEachKernel< Iterator, KeepFunctor >::start(), QtConcurrent::ThreadEngine< T >::startAsynchronously(), and waitForResume().
|
protected |
Definition at line 93 of file qtconcurrentthreadengine.h.
|
protected |
Definition at line 90 of file qtconcurrentthreadengine.h.
Referenced by QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction(), and QtConcurrent::ThreadEngine< T >::startAsynchronously().