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
QFutureInterfaceBase Class Reference

#include <qfutureinterface.h>

+ Inheritance diagram for QFutureInterfaceBase:
+ Collaboration diagram for QFutureInterfaceBase:

Public Types

enum  State {
  NoState = 0x00 , Running = 0x01 , Started = 0x02 , Finished = 0x04 ,
  Canceled = 0x08 , Suspending = 0x10 , Suspended = 0x20 , Throttled = 0x40 ,
  Pending = 0x80
}
 

Public Member Functions

 QFutureInterfaceBase (State initialState=NoState)
 
 QFutureInterfaceBase (const QFutureInterfaceBase &other)
 
 QFutureInterfaceBase (QFutureInterfaceBase &&other) noexcept
 
QFutureInterfaceBaseoperator= (const QFutureInterfaceBase &other)
 
virtual ~QFutureInterfaceBase ()
 
void reportStarted ()
 
void reportFinished ()
 
void reportCanceled ()
 
void reportException (const QException &e)
 
void reportException (const std::exception_ptr &e)
 
void reportResultsReady (int beginIndex, int endIndex)
 
void setRunnable (QRunnable *runnable)
 
void setThreadPool (QThreadPool *pool)
 
QThreadPoolthreadPool () const
 
void setFilterMode (bool enable)
 
void setProgressRange (int minimum, int maximum)
 
int progressMinimum () const
 
int progressMaximum () const
 
bool isProgressUpdateNeeded () const
 
void setProgressValue (int progressValue)
 
int progressValue () const
 
void setProgressValueAndText (int progressValue, const QString &progressText)
 
QString progressText () const
 
void setExpectedResultCount (int resultCount)
 
int expectedResultCount ()
 
int resultCount () const
 
bool queryState (State state) const
 
bool isRunning () const
 
bool isStarted () const
 
bool isCanceled () const
 
bool isFinished () const
 
bool isSuspending () const
 
bool isSuspended () const
 
bool isThrottled () const
 
bool isResultReadyAt (int index) const
 
bool isValid () const
 
int loadState () const
 
void cancel ()
 
void cancelAndFinish ()
 
void setSuspended (bool suspend)
 
void toggleSuspended ()
 
void reportSuspended () const
 
void setThrottled (bool enable)
 
void waitForFinished ()
 
bool waitForNextResult ()
 
void waitForResult (int resultIndex)
 
void waitForResume ()
 
void suspendIfRequested ()
 
QMutexmutex () const
 
bool hasException () const
 
QtPrivate::ExceptionStoreexceptionStore ()
 
QtPrivate::ResultStoreBaseresultStoreBase ()
 
const QtPrivate::ResultStoreBaseresultStoreBase () const
 
bool operator== (const QFutureInterfaceBase &other) const
 
bool operator!= (const QFutureInterfaceBase &other) const
 
void swap (QFutureInterfaceBase &other) noexcept
 
bool isChainCanceled () const
 

Static Public Member Functions

template<typename T >
static QFutureInterfaceBase get (const QFuture< T > &future)
 

Protected Types

enum class  CancelMode { CancelOnly , CancelAndFinish }
 

Protected Member Functions

bool refT () const noexcept
 
bool derefT () const noexcept
 
void reset ()
 
void rethrowPossibleException ()
 
void setContinuation (std::function< void(const QFutureInterfaceBase &)> func)
 
void setContinuation (std::function< void(const QFutureInterfaceBase &)> func, QFutureInterfaceBasePrivate *continuationFutureData)
 
void cleanContinuation ()
 
void runContinuation () const
 
void setLaunchAsync (bool value)
 
bool launchAsync () const
 
bool isRunningOrPending () const
 
void cancel (CancelMode mode)
 

Friends

class QFutureWatcherBase
 
class QFutureWatcherBasePrivate
 
template<typename Function , typename ResultType , typename ParentResultType >
class QtPrivate::Continuation
 
template<class Function , class ResultType >
class QtPrivate::CanceledHandler
 
template<class Function , class ResultType >
class QtPrivate::FailureHandler
 
template<class T >
class QPromise
 
Q_CORE_EXPORT void QtPrivate::watchContinuationImpl (const QObject *context, QtPrivate::QSlotObjectBase *slotObj, QFutureInterfaceBase &fi)
 

Detailed Description

Definition at line 48 of file qfutureinterface.h.

Member Enumeration Documentation

◆ CancelMode

enum class QFutureInterfaceBase::CancelMode
strongprotected
Enumerator
CancelOnly 
CancelAndFinish 

Definition at line 202 of file qfutureinterface.h.

◆ State

Enumerator
NoState 
Running 
Started 
Finished 
Canceled 
Suspending 
Suspended 
Throttled 
Pending 

Definition at line 51 of file qfutureinterface.h.

Constructor & Destructor Documentation

◆ QFutureInterfaceBase() [1/3]

QFutureInterfaceBase::QFutureInterfaceBase ( State initialState = NoState)

Definition at line 105 of file qfutureinterface.cpp.

◆ QFutureInterfaceBase() [2/3]

QFutureInterfaceBase::QFutureInterfaceBase ( const QFutureInterfaceBase & other)

Definition at line 109 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::RefCount::ref(), and QFutureInterfaceBasePrivate::refCount.

+ Here is the call graph for this function:

◆ QFutureInterfaceBase() [3/3]

QFutureInterfaceBase::QFutureInterfaceBase ( QFutureInterfaceBase && other)
inlinenoexcept

Definition at line 66 of file qfutureinterface.h.

◆ ~QFutureInterfaceBase()

QFutureInterfaceBase::~QFutureInterfaceBase ( )
virtual

Definition at line 115 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::RefCount::deref(), and QFutureInterfaceBasePrivate::refCount.

+ Here is the call graph for this function:

Member Function Documentation

◆ cancel() [1/2]

void QFutureInterfaceBase::cancel ( )

Definition at line 140 of file qfutureinterface.cpp.

References cancel(), and CancelOnly.

Referenced by cancel(), and reportCanceled().

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

◆ cancel() [2/2]

◆ cancelAndFinish()

void QFutureInterfaceBase::cancelAndFinish ( )
inline

Definition at line 126 of file qfutureinterface.h.

References cancel().

+ Here is the call graph for this function:

◆ cleanContinuation()

◆ derefT()

bool QFutureInterfaceBase::derefT ( ) const
protectednoexcept

Definition at line 667 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::RefCount::derefT(), and QFutureInterfaceBasePrivate::refCount.

Referenced by QFutureInterface< T >::~QFutureInterface().

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

◆ exceptionStore()

QtPrivate::ExceptionStore & QFutureInterfaceBase::exceptionStore ( )

Definition at line 631 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::data, QFutureInterfaceBasePrivate::hasException, QFutureInterfaceBasePrivate::Data::m_exceptionStore, and Q_ASSERT.

Referenced by rethrowPossibleException().

+ Here is the caller graph for this function:

◆ expectedResultCount()

int QFutureInterfaceBase::expectedResultCount ( )

◆ get()

template<typename T >
QFutureInterfaceBase QFutureInterfaceBase::get ( const QFuture< T > & future)
static

Definition at line 424 of file qfuture.h.

References future.

◆ hasException()

bool QFutureInterfaceBase::hasException ( ) const

Definition at line 626 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::hasException.

Referenced by QFutureInterface< T >::~QFutureInterface(), QFutureInterface< T >::reportException(), QFutureInterface< T >::reportException(), rethrowPossibleException(), and setFilterMode().

+ Here is the caller graph for this function:

◆ isCanceled()

bool QFutureInterfaceBase::isCanceled ( ) const

Definition at line 245 of file qfutureinterface.cpp.

References Canceled, and queryState().

Referenced by QtConcurrent::ThreadEngineBase::isCanceled(), and isChainCanceled().

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

◆ isChainCanceled()

bool QFutureInterfaceBase::isChainCanceled ( ) const

Definition at line 931 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::Canceled, QFutureInterfaceBasePrivate::continuationState, and isCanceled().

+ Here is the call graph for this function:

◆ isFinished()

bool QFutureInterfaceBase::isFinished ( ) const

Definition at line 250 of file qfutureinterface.cpp.

References Finished, and queryState().

Referenced by reportFinished(), setContinuation(), and waitForFinished().

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

◆ isProgressUpdateNeeded()

bool QFutureInterfaceBase::isProgressUpdateNeeded ( ) const

Definition at line 381 of file qfutureinterface.cpp.

References QElapsedTimer::elapsed(), QElapsedTimer::isValid(), QFutureInterfaceBasePrivate::m_mutex, MaxProgressEmitsPerSecond, and QFutureInterfaceBasePrivate::progressTime.

+ Here is the call graph for this function:

◆ isResultReadyAt()

bool QFutureInterfaceBase::isResultReadyAt ( int index) const

Definition at line 277 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::internal_isResultReadyAt(), lock, and QFutureInterfaceBasePrivate::m_mutex.

+ Here is the call graph for this function:

◆ isRunning()

bool QFutureInterfaceBase::isRunning ( ) const

Definition at line 235 of file qfutureinterface.cpp.

References queryState(), and Running.

+ Here is the call graph for this function:

◆ isRunningOrPending()

bool QFutureInterfaceBase::isRunningOrPending ( ) const
protected

Definition at line 289 of file qfutureinterface.cpp.

References Pending, queryState(), and Running.

Referenced by waitForResult().

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

◆ isStarted()

bool QFutureInterfaceBase::isStarted ( ) const

Definition at line 240 of file qfutureinterface.cpp.

References queryState(), and Started.

+ Here is the call graph for this function:

◆ isSuspended()

bool QFutureInterfaceBase::isSuspended ( ) const

Definition at line 267 of file qfutureinterface.cpp.

References queryState(), and Suspended.

+ Here is the call graph for this function:

◆ isSuspending()

bool QFutureInterfaceBase::isSuspending ( ) const

Definition at line 255 of file qfutureinterface.cpp.

References queryState(), and Suspending.

Referenced by QtConcurrent::ThreadEngineBase::reportIfSuspensionDone().

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

◆ isThrottled()

bool QFutureInterfaceBase::isThrottled ( ) const

Definition at line 272 of file qfutureinterface.cpp.

References queryState(), and Throttled.

+ Here is the call graph for this function:

◆ isValid()

bool QFutureInterfaceBase::isValid ( ) const

◆ launchAsync()

bool QFutureInterfaceBase::launchAsync ( ) const
protected

Definition at line 941 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::launchAsync.

◆ loadState()

int QFutureInterfaceBase::loadState ( ) const

Definition at line 458 of file qfutureinterface.cpp.

References QBasicAtomicInteger< T >::loadRelaxed(), NoState, and QFutureInterfaceBasePrivate::state.

+ Here is the call graph for this function:

◆ mutex()

QMutex & QFutureInterfaceBase::mutex ( ) const

Definition at line 621 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_mutex.

◆ operator!=()

bool QFutureInterfaceBase::operator!= ( const QFutureInterfaceBase & other) const
inline

Definition at line 146 of file qfutureinterface.h.

References d, and other().

+ Here is the call graph for this function:

◆ operator=()

QFutureInterfaceBase & QFutureInterfaceBase::operator= ( const QFutureInterfaceBase & other)

Definition at line 649 of file qfutureinterface.cpp.

References copy(), other(), and swap().

+ Here is the call graph for this function:

◆ operator==()

bool QFutureInterfaceBase::operator== ( const QFutureInterfaceBase & other) const
inline

Definition at line 145 of file qfutureinterface.h.

References d, and other().

+ Here is the call graph for this function:

◆ progressMaximum()

int QFutureInterfaceBase::progressMaximum ( ) const

◆ progressMinimum()

int QFutureInterfaceBase::progressMinimum ( ) const

◆ progressText()

QString QFutureInterfaceBase::progressText ( ) const

Definition at line 375 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_mutex, and QFutureInterfaceBasePrivate::m_progress.

Referenced by setProgressValueAndText().

+ Here is the caller graph for this function:

◆ progressValue()

int QFutureInterfaceBase::progressValue ( ) const

Definition at line 351 of file qfutureinterface.cpp.

References lock, QFutureInterfaceBasePrivate::m_mutex, and QFutureInterfaceBasePrivate::m_progressValue.

Referenced by setProgressValue(), and setProgressValueAndText().

+ Here is the caller graph for this function:

◆ queryState()

bool QFutureInterfaceBase::queryState ( State state) const

Definition at line 453 of file qfutureinterface.cpp.

References QBasicAtomicInteger< T >::loadRelaxed(), QFutureInterfaceBasePrivate::state, and state.

Referenced by isCanceled(), isFinished(), isRunning(), isRunningOrPending(), isStarted(), isSuspended(), isSuspending(), and isThrottled().

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

◆ refT()

bool QFutureInterfaceBase::refT ( ) const
protectednoexcept

Definition at line 662 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::refCount, and QFutureInterfaceBasePrivate::RefCount::refT().

Referenced by QFutureInterface< T >::QFutureInterface(), QFutureInterface< T >::QFutureInterface(), QFutureInterface< T >::QFutureInterface(), and QFutureInterface< T >::QFutureInterface().

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

◆ reportCanceled()

void QFutureInterfaceBase::reportCanceled ( )

Definition at line 397 of file qfutureinterface.cpp.

References cancel().

+ Here is the call graph for this function:

◆ reportException() [1/2]

void QFutureInterfaceBase::reportException ( const QException & e)

Definition at line 403 of file qfutureinterface.cpp.

References QException::raise(), and reportException().

Referenced by reportException(), QFutureInterface< T >::reportException(), and QFutureInterface< T >::reportException().

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

◆ reportException() [2/2]

void QFutureInterfaceBase::reportException ( const std::exception_ptr & e)

Definition at line 415 of file qfutureinterface.cpp.

References QFutureCallOutEvent::Canceled, d, and switch_on().

+ Here is the call graph for this function:

◆ reportFinished()

void QFutureInterfaceBase::reportFinished ( )

Definition at line 431 of file qfutureinterface.cpp.

References Finished, QFutureCallOutEvent::Finished, isFinished(), QFutureInterfaceBasePrivate::m_mutex, Running, QFutureInterfaceBasePrivate::sendCallOut(), QFutureInterfaceBasePrivate::state, switch_from_to(), QFutureInterfaceBasePrivate::waitCondition, and QWaitCondition::wakeAll().

Referenced by QFutureInterface< T >::reportFinished(), and QFutureInterface< void >::reportFinished().

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

◆ reportResultsReady()

◆ reportStarted()

void QFutureInterfaceBase::reportStarted ( )

Definition at line 387 of file qfutureinterface.cpp.

References Canceled, Finished, QFutureInterfaceBasePrivate::isValid, QBasicAtomicInteger< T >::loadRelaxed(), QFutureInterfaceBasePrivate::m_mutex, Running, QFutureInterfaceBasePrivate::sendCallOut(), QFutureInterfaceBasePrivate::setState(), Started, QFutureCallOutEvent::Started, and QFutureInterfaceBasePrivate::state.

Referenced by QtConcurrent::ThreadEngine< T >::startAsynchronously().

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

◆ reportSuspended()

void QFutureInterfaceBase::reportSuspended ( ) const

Definition at line 208 of file qfutureinterface.cpp.

References QBasicAtomicInteger< T >::loadRelaxed(), QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::sendCallOut(), QFutureInterfaceBasePrivate::state, state, Suspended, QFutureCallOutEvent::Suspended, Suspending, and switch_from_to().

Referenced by QtConcurrent::ThreadEngineBase::reportIfSuspensionDone().

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

◆ reset()

void QFutureInterfaceBase::reset ( )
protected

Definition at line 673 of file qfutureinterface.cpp.

References QElapsedTimer::invalidate(), QFutureInterfaceBasePrivate::isValid, QFutureInterfaceBasePrivate::m_progress, QFutureInterfaceBasePrivate::m_progressValue, and QFutureInterfaceBasePrivate::progressTime.

+ Here is the call graph for this function:

◆ resultCount()

int QFutureInterfaceBase::resultCount ( ) const

Definition at line 369 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::internal_resultCount(), lock, and QFutureInterfaceBasePrivate::m_mutex.

Referenced by setExpectedResultCount().

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

◆ resultStoreBase() [1/2]

QtPrivate::ResultStoreBase & QFutureInterfaceBase::resultStoreBase ( )

Definition at line 637 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::data, QFutureInterfaceBasePrivate::hasException, QFutureInterfaceBasePrivate::Data::m_results, and Q_ASSERT.

Referenced by QFutureInterface< T >::~QFutureInterface(), QFutureInterface< T >::reportException(), QFutureInterface< T >::reportException(), and setFilterMode().

+ Here is the caller graph for this function:

◆ resultStoreBase() [2/2]

◆ rethrowPossibleException()

void QFutureInterfaceBase::rethrowPossibleException ( )
protected

Definition at line 681 of file qfutureinterface.cpp.

References exceptionStore(), hasException(), and QtPrivate::ExceptionStore::rethrowException().

+ Here is the call graph for this function:

◆ runContinuation()

void QFutureInterfaceBase::runContinuation ( ) const
protected

Definition at line 911 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::Cleaned, QFutureInterfaceBasePrivate::continuation, QFutureInterfaceBasePrivate::continuationMutex, QFutureInterfaceBasePrivate::continuationState, and lock.

Referenced by QFutureInterface< T >::reportFinished(), and QFutureInterface< void >::reportFinished().

+ Here is the caller graph for this function:

◆ setContinuation() [1/2]

void QFutureInterfaceBase::setContinuation ( std::function< void(const QFutureInterfaceBase &)> func)
protected

Definition at line 870 of file qfutureinterface.cpp.

References setContinuation().

Referenced by setContinuation().

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

◆ setContinuation() [2/2]

void QFutureInterfaceBase::setContinuation ( std::function< void(const QFutureInterfaceBase &)> func,
QFutureInterfaceBasePrivate * continuationFutureData )
protected

Definition at line 875 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::Cleaned, QFutureInterfaceBasePrivate::continuation, QFutureInterfaceBasePrivate::continuationData, QFutureInterfaceBasePrivate::continuationMutex, QFutureInterfaceBasePrivate::continuationState, isFinished(), lock, and qWarning.

+ Here is the call graph for this function:

◆ setExpectedResultCount()

void QFutureInterfaceBase::setExpectedResultCount ( int resultCount)

Definition at line 441 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_expectedResultCount, QFutureInterfaceBasePrivate::m_progress, resultCount(), and setProgressRange().

+ Here is the call graph for this function:

◆ setFilterMode()

void QFutureInterfaceBase::setFilterMode ( bool enable)

Definition at line 550 of file qfutureinterface.cpp.

References hasException(), QFutureInterfaceBasePrivate::m_mutex, resultStoreBase(), and QtPrivate::ResultStoreBase::setFilterMode().

Referenced by QtConcurrent::FilteredEachKernel< Iterator, KeepFunctor >::start().

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

◆ setLaunchAsync()

void QFutureInterfaceBase::setLaunchAsync ( bool value)
protected

Definition at line 936 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::launchAsync.

◆ setProgressRange()

void QFutureInterfaceBase::setProgressRange ( int minimum,
int maximum )

Sets the progress range's minimum and maximum values to minimum and maximum respectively.

If maximum is smaller than minimum, minimum becomes the only legal value.

The progress value is reset to be minimum.

The progress range usage can be disabled by using setProgressRange(0, 0). In this case progress value is also reset to 0.

The behavior of this method is mostly inspired by \l QProgressBar::setRange.

Definition at line 573 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::m_progress, QFutureInterfaceBasePrivate::m_progressValue, QFutureCallOutEvent::ProgressRange, qMax(), and QFutureInterfaceBasePrivate::sendCallOut().

Referenced by setExpectedResultCount(), and QtConcurrent::ThreadEngineBase::setProgressRange().

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

◆ setProgressValue()

void QFutureInterfaceBase::setProgressValue ( int progressValue)

Definition at line 584 of file qfutureinterface.cpp.

References progressValue(), and setProgressValueAndText().

Referenced by QtConcurrent::ThreadEngineBase::setProgressValue().

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

◆ setProgressValueAndText()

void QFutureInterfaceBase::setProgressValueAndText ( int progressValue,
const QString & progressText )

In case of the progressValue falling out of the progress range, this method has no effect. Such behavior is inspired by \l QProgressBar::setValue.

Definition at line 595 of file qfutureinterface.cpp.

References Canceled, Finished, QFutureInterfaceBasePrivate::internal_updateProgress(), QBasicAtomicInteger< T >::loadRelaxed(), QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::m_progress, QFutureInterfaceBasePrivate::m_progressValue, QFutureCallOutEvent::Progress, progressText(), progressValue(), QFutureInterfaceBasePrivate::sendCallOut(), and QFutureInterfaceBasePrivate::state.

Referenced by setProgressValue().

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

◆ setRunnable()

void QFutureInterfaceBase::setRunnable ( QRunnable * runnable)

Definition at line 535 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::runnable.

◆ setSuspended()

void QFutureInterfaceBase::setSuspended ( bool suspend)

Definition at line 182 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::pausedWaitCondition, QFutureCallOutEvent::Resumed, QFutureInterfaceBasePrivate::sendCallOut(), QFutureInterfaceBasePrivate::state, suspend(), Suspending, QFutureCallOutEvent::Suspending, switch_off(), switch_on(), and QWaitCondition::wakeAll().

+ Here is the call graph for this function:

◆ setThreadPool()

void QFutureInterfaceBase::setThreadPool ( QThreadPool * pool)

Definition at line 540 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_pool, and pool.

◆ setThrottled()

void QFutureInterfaceBase::setThrottled ( bool enable)

Definition at line 222 of file qfutureinterface.cpp.

References QBasicAtomicInteger< T >::loadRelaxed(), lock, QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::pausedWaitCondition, QFutureInterfaceBasePrivate::state, switch_off(), switch_on(), Throttled, and QWaitCondition::wakeAll().

+ Here is the call graph for this function:

◆ suspendIfRequested()

void QFutureInterfaceBase::suspendIfRequested ( )

◆ swap()

void QFutureInterfaceBase::swap ( QFutureInterfaceBase & other)
noexcept

Definition at line 657 of file qfutureinterface.cpp.

References d, other(), and qSwap().

Referenced by QFutureInterface< T >::operator=(), and operator=().

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

◆ threadPool()

QThreadPool * QFutureInterfaceBase::threadPool ( ) const

Definition at line 545 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_pool.

◆ toggleSuspended()

void QFutureInterfaceBase::toggleSuspended ( )

◆ waitForFinished()

◆ waitForNextResult()

bool QFutureInterfaceBase::waitForNextResult ( )

Definition at line 294 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::internal_waitForNextResult(), lock, and QFutureInterfaceBasePrivate::m_mutex.

+ Here is the call graph for this function:

◆ waitForResult()

void QFutureInterfaceBase::waitForResult ( int resultIndex)

Definition at line 466 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::data, QFutureInterfaceBasePrivate::hasException, QFutureInterfaceBasePrivate::internal_isResultReadyAt(), isRunningOrPending(), lock, QFutureInterfaceBasePrivate::Data::m_exceptionStore, QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::pool(), QtPrivate::ExceptionStore::rethrowException(), QFutureInterfaceBasePrivate::runnable, QWaitCondition::wait(), and QFutureInterfaceBasePrivate::waitCondition.

Referenced by QFutureInterface< T >::results().

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

◆ waitForResume()

void QFutureInterfaceBase::waitForResume ( )

Definition at line 300 of file qfutureinterface.cpp.

References Canceled, QBasicAtomicInteger< T >::loadRelaxed(), lock, QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::pausedWaitCondition, QFutureInterfaceBasePrivate::pool(), releaser, QFutureInterfaceBasePrivate::state, state, and QWaitCondition::wait().

Referenced by QtConcurrent::ThreadEngineBase::waitForResume().

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

Friends And Related Symbol Documentation

◆ QFutureWatcherBase

friend class QFutureWatcherBase
friend

Definition at line 170 of file qfutureinterface.h.

◆ QFutureWatcherBasePrivate

friend class QFutureWatcherBasePrivate
friend

Definition at line 171 of file qfutureinterface.h.

◆ QPromise

template<class T >
friend class QPromise
friend

Definition at line 188 of file qfutureinterface.h.

◆ QtPrivate::CanceledHandler

template<class Function , class ResultType >
friend class QtPrivate::CanceledHandler
friend

Definition at line 177 of file qfutureinterface.h.

◆ QtPrivate::Continuation

template<typename Function , typename ResultType , typename ParentResultType >
friend class QtPrivate::Continuation
friend

Definition at line 174 of file qfutureinterface.h.

◆ QtPrivate::FailureHandler

template<class Function , class ResultType >
friend class QtPrivate::FailureHandler
friend

Definition at line 181 of file qfutureinterface.h.

◆ QtPrivate::watchContinuationImpl

Q_CORE_EXPORT void QtPrivate::watchContinuationImpl ( const QObject * context,
QtPrivate::QSlotObjectBase * slotObj,
QFutureInterfaceBase & fi )
friend

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