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
QtConcurrent::RunFunctionTaskBase< T > Class Template Referenceabstract

#include <qtconcurrentrunbase.h>

+ Inheritance diagram for QtConcurrent::RunFunctionTaskBase< T >:
+ Collaboration diagram for QtConcurrent::RunFunctionTaskBase< T >:

Public Member Functions

QFuture< T > start ()
 
QFuture< T > start (const TaskStartParameters &parameters)
 
QFuture< T > start (QThreadPool *pool)
 
void run () override
 Implement this pure virtual function in your subclass.
 
- 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
 

Protected Member Functions

virtual void runFunctor ()=0
 

Protected Attributes

QFutureInterface< T > promise
 

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
 

Detailed Description

template<typename T>
class QtConcurrent::RunFunctionTaskBase< T >

Definition at line 46 of file qtconcurrentrunbase.h.

Member Function Documentation

◆ run()

template<typename T >
void QtConcurrent::RunFunctionTaskBase< T >::run ( )
inlineoverridevirtual

Implement this pure virtual function in your subclass.

Implements QRunnable.

Definition at line 74 of file qtconcurrentrunbase.h.

References QtConcurrent::RunFunctionTaskBase< T >::promise, and QtConcurrent::RunFunctionTaskBase< T >::runFunctor().

+ Here is the call graph for this function:

◆ runFunctor()

template<typename T >
virtual void QtConcurrent::RunFunctionTaskBase< T >::runFunctor ( )
protectedpure virtual

Implemented in QtConcurrent::StoredFunctionCall< Function, Args >, and QtConcurrent::StoredFunctionCallWithPromise< Function, PromiseType, Args >.

Referenced by QtConcurrent::RunFunctionTaskBase< T >::run().

+ Here is the caller graph for this function:

◆ start() [1/3]

template<typename T >
QFuture< T > QtConcurrent::RunFunctionTaskBase< T >::start ( )
inline

Definition at line 49 of file qtconcurrentrunbase.h.

References QtConcurrent::RunFunctionTaskBase< T >::start().

Referenced by QtConcurrent::RunFunctionTaskBase< T >::start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ start() [2/3]

template<typename T >
QFuture< T > QtConcurrent::RunFunctionTaskBase< T >::start ( const TaskStartParameters & parameters)
inline

Definition at line 54 of file qtconcurrentrunbase.h.

References QtConcurrent::TaskStartParameters::priority, QtConcurrent::RunFunctionTaskBase< T >::promise, QThreadPool::start(), and QtConcurrent::TaskStartParameters::threadPool.

+ Here is the call graph for this function:

◆ start() [3/3]

template<typename T >
QFuture< T > QtConcurrent::RunFunctionTaskBase< T >::start ( QThreadPool * pool)
inline

Definition at line 72 of file qtconcurrentrunbase.h.

References pool, and QtConcurrent::RunFunctionTaskBase< T >::start().

Referenced by QtConcurrent::RunFunctionTaskBase< T >::start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ promise


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