4#ifndef QTCONCURRENT_THREADENGINE_H
5#define QTCONCURRENT_THREADENGINE_H
7#include <QtConcurrent/qtconcurrent_global.h>
9#if !defined(QT_NO_CONCURRENT) ||defined(Q_QDOC)
11#include <QtCore/qthreadpool.h>
12#include <QtCore/qfuture.h>
13#include <QtCore/qexception.h>
14#include <QtCore/qwaitcondition.h>
15#include <QtCore/qatomic.h>
16#include <QtCore/qsemaphore.h>
84#ifndef QT_NO_EXCEPTIONS
108 return static_cast<QFutureInterface<T> *>(futureInterface);
114 ThreadEngineBase::startSingleThreaded();
122 futureInterface =
new QFutureInterface<T>();
127 futureInterface->reportStarted();
128 QFuture<T> future = QFuture<T>(futureInterfaceTyped());
131 acquireBarrierSemaphore();
132 threadPool->start(
this);
139 futureInterfaceTyped()->reportFinished(result());
140 delete futureInterfaceTyped();
148 futureInterfaceTyped()->reportResult(_result, index);
154 futureInterfaceTyped()->reportResults(_result, index, count);
174 return threadEngine->startAsynchronously();
210template <
typename ThreadEngine>
ThreadEngineStarterBase(ThreadEngine< T > *_threadEngine)
ThreadEngineStarterBase(const ThreadEngineStarterBase &other)
QFuture< T > startAsynchronously()
ThreadEngineStarter(ThreadEngine< void > *_threadEngine)
ThreadEngineStarter(TypedThreadEngine *eng)
ThreadEngine(QThreadPool *pool)
T * startSingleThreaded()
QFuture< T > startAsynchronously()
QFutureInterface< T > * futureInterfaceTyped()
void reportResult(const T *_result, int index=-1)
void asynchronousFinish() override
void reportResults(const QList< T > &_result, int index=-1, int count=-1)
Combined button and popup list for selecting options.
ThreadEngineStarter< typename ThreadEngine::ResultType > startThreadEngine(ThreadEngine *threadEngine)
[qtconcurrentthreadengine-1]