Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType > Class Template Referencefinal

#include <qfuture_impl.h>

+ Inheritance diagram for QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >:
+ Collaboration diagram for QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >:

Public Member Functions

template<typename F = Function>
 AsyncContinuation (F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p, QThreadPool *pool=nullptr)
 
 ~AsyncContinuation () override=default
 
- Public Member Functions inherited from QRunnable
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
 
- Public Member Functions inherited from QtPrivate::Continuation< Function, ResultType, ParentResultType >
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

- 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 QRunnablecreate (Callable &&functionToRun)
 
static QRunnablecreate (std::nullptr_t)=delete
 
- Static Public Member Functions inherited from QtPrivate::Continuation< Function, ResultType, ParentResultType >
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)
 
- Protected Member Functions inherited from QtPrivate::Continuation< Function, ResultType, ParentResultType >
void runFunction ()
 
- Protected Attributes inherited from QtPrivate::Continuation< Function, ResultType, ParentResultType >
QPromise< ResultType > promise
 
QFuture< ParentResultType > parentFuture
 
Function function
 

Detailed Description

template<typename Function, typename ResultType, typename ParentResultType>
class QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >

Definition at line 350 of file qfuture_impl.h.

Constructor & Destructor Documentation

◆ AsyncContinuation()

template<typename Function , typename ResultType , typename ParentResultType >
template<typename F = Function>
QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >::AsyncContinuation ( F && func,
const QFuture< ParentResultType > & f,
QPromise< ResultType > && p,
QThreadPool * pool = nullptr )
inline

Definition at line 355 of file qfuture_impl.h.

◆ ~AsyncContinuation()

template<typename Function , typename ResultType , typename ParentResultType >
QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >::~AsyncContinuation ( )
overridedefault

Member Function Documentation

◆ run()

template<typename Function , typename ResultType , typename ParentResultType >
void QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >::run ( )
inlineoverrideprivatevirtual

Implement this pure virtual function in your subclass.

Implements QRunnable.

Definition at line 372 of file qfuture_impl.h.

References QtPrivate::Continuation< Function, ResultType, ParentResultType >::runFunction().

+ Here is the call graph for this function:

◆ runImpl()

template<typename Function , typename ResultType , typename ParentResultType >
void QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >::runImpl ( )
inlineoverrideprivatevirtual

Implements QtPrivate::Continuation< Function, ResultType, ParentResultType >.

Definition at line 366 of file qfuture_impl.h.

References QThreadPool::globalInstance(), pool, and QThreadPool::start().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: