![]() |
Qt 6.x
The Qt SDK
|
#include <qfuture_impl.h>
Public Member Functions | |
template<typename F = Function> | |
AsyncContinuation (F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p, QThreadPool *pool=nullptr) | |
~AsyncContinuation () override=default | |
![]() | |
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 |
![]() | |
template<typename F = Function> | |
Continuation (F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p) | |
virtual | ~Continuation ()=default |
bool | execute () |
Private Member Functions | |
void | runImpl () override |
void | run () override |
Implement this pure virtual function in your subclass. | |
Additional Inherited Members | |
![]() | |
template<typename Callable > | |
using | if_callable = std::enable_if_t< std::is_invocable_r_v< void, Callable >, bool > |
![]() | |
template<typename Callable , if_callable< Callable > = true> | |
static QRunnable * | create (Callable &&functionToRun) |
static QRunnable * | create (std::nullptr_t)=delete |
![]() | |
template<typename F = Function> | |
static void | create (F &&func, QFuture< ParentResultType > *f, QFutureInterface< ResultType > &fi, QtFuture::Launch policy) |
template<typename F = Function> | |
static void | create (F &&func, QFuture< ParentResultType > *f, QFutureInterface< ResultType > &fi, QThreadPool *pool) |
template<typename F = Function> | |
static void | create (F &&func, QFuture< ParentResultType > *f, QFutureInterface< ResultType > &fi, QObject *context) |
![]() | |
virtual void | runImpl ()=0 |
void | runFunction () |
![]() | |
QPromise< ResultType > | promise |
QFuture< ParentResultType > | parentFuture |
Function | function |
Definition at line 351 of file qfuture_impl.h.
|
inline |
Definition at line 356 of file qfuture_impl.h.
|
overridedefault |
|
inlineoverrideprivatevirtual |
Implement this pure virtual function in your subclass.
Implements QRunnable.
Definition at line 373 of file qfuture_impl.h.
References QtPrivate::Continuation< Function, ResultType, ParentResultType >::runFunction().
|
inlineoverrideprivatevirtual |
Implements QtPrivate::Continuation< Function, ResultType, ParentResultType >.
Definition at line 367 of file qfuture_impl.h.
References QThreadPool::globalInstance(), pool, and QThreadPool::start().