Qt 6.x
The Qt SDK
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
 
class QtPrivate::QBasicFutureWatcher
 
template<class T >
class QPromise
 

Detailed Description

Definition at line 45 of file qfutureinterface.h.

Member Enumeration Documentation

◆ CancelMode

enum class QFutureInterfaceBase::CancelMode
strongprotected
Enumerator
CancelOnly 
CancelAndFinish 

Definition at line 198 of file qfutureinterface.h.

◆ State

Enumerator
NoState 
Running 
Started 
Finished 
Canceled 
Suspending 
Suspended 
Throttled 
Pending 

Definition at line 48 of file qfutureinterface.h.

Constructor & Destructor Documentation

◆ QFutureInterfaceBase() [1/3]

QFutureInterfaceBase::QFutureInterfaceBase ( State  initialState = NoState)

Definition at line 50 of file qfutureinterface.cpp.

◆ QFutureInterfaceBase() [2/3]

QFutureInterfaceBase::QFutureInterfaceBase ( const QFutureInterfaceBase other)

Definition at line 54 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 63 of file qfutureinterface.h.

◆ ~QFutureInterfaceBase()

QFutureInterfaceBase::~QFutureInterfaceBase ( )
virtual

Definition at line 60 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 85 of file qfutureinterface.cpp.

References cancel(), and CancelOnly.

Referenced by cancel(), QFutureWatcherBase::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 123 of file qfutureinterface.h.

References cancel().

+ Here is the call graph for this function:

◆ cleanContinuation()

void QFutureInterfaceBase::cleanContinuation ( )
protected

Definition at line 852 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::Cleaned, d, and lock.

◆ derefT()

bool QFutureInterfaceBase::derefT ( ) const
protectednoexcept

Definition at line 612 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 576 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 571 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::hasException.

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

+ Here is the caller graph for this function:

◆ isCanceled()

bool QFutureInterfaceBase::isCanceled ( ) const

Definition at line 190 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 883 of file qfutureinterface.cpp.

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

+ Here is the call graph for this function:

◆ isFinished()

bool QFutureInterfaceBase::isFinished ( ) const

Definition at line 195 of file qfutureinterface.cpp.

References Finished, and queryState().

Referenced by QFutureWatcherBase::isFinished(), 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 326 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 222 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 180 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 234 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 185 of file qfutureinterface.cpp.

References queryState(), and Started.

+ Here is the call graph for this function:

◆ isSuspended()

bool QFutureInterfaceBase::isSuspended ( ) const

Definition at line 212 of file qfutureinterface.cpp.

References queryState(), and Suspended.

Referenced by QFutureWatcherBase::isSuspended().

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

◆ isSuspending()

bool QFutureInterfaceBase::isSuspending ( ) const

Definition at line 200 of file qfutureinterface.cpp.

References queryState(), and Suspending.

Referenced by QFutureWatcherBase::isSuspending(), and 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 217 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 893 of file qfutureinterface.cpp.

References d.

◆ loadState()

int QFutureInterfaceBase::loadState ( ) const

Definition at line 403 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 566 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_mutex.

◆ operator!=()

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

Definition at line 143 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 594 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 142 of file qfutureinterface.h.

References d, and other().

+ Here is the call graph for this function:

◆ progressMaximum()

int QFutureInterfaceBase::progressMaximum ( ) const

Definition at line 308 of file qfutureinterface.cpp.

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

Referenced by QFutureWatcherBase::progressMaximum().

+ Here is the caller graph for this function:

◆ progressMinimum()

int QFutureInterfaceBase::progressMinimum ( ) const

Definition at line 302 of file qfutureinterface.cpp.

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

Referenced by QFutureWatcherBase::progressMinimum().

+ Here is the caller graph for this function:

◆ progressText()

QString QFutureInterfaceBase::progressText ( ) const

Definition at line 320 of file qfutureinterface.cpp.

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

Referenced by QFutureWatcherBase::progressText(), and setProgressValueAndText().

+ Here is the caller graph for this function:

◆ progressValue()

int QFutureInterfaceBase::progressValue ( ) const

Definition at line 296 of file qfutureinterface.cpp.

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

Referenced by QFutureWatcherBase::progressValue(), setProgressValue(), and setProgressValueAndText().

+ Here is the caller graph for this function:

◆ queryState()

bool QFutureInterfaceBase::queryState ( State  state) const

Definition at line 398 of file qfutureinterface.cpp.

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

Referenced by isCanceled(), QFutureWatcherBase::isCanceled(), isFinished(), isRunning(), QFutureWatcherBase::isRunning(), isRunningOrPending(), isStarted(), QFutureWatcherBase::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 607 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 342 of file qfutureinterface.cpp.

References cancel().

Referenced by QtFuture::connect(), and QtPrivate::UnwrapHandler::unwrapImpl().

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

◆ reportException() [1/2]

void QFutureInterfaceBase::reportException ( const QException e)

Definition at line 348 of file qfutureinterface.cpp.

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

Referenced by QFutureInterface< void >::QFutureInterface(), 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 360 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 376 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 332 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 QtFuture::connect(), QtFuture::makeExceptionalFuture(), QtPrivate::makeReadyRangeFutureImpl(), QtFuture::makeReadyValueFuture(), QtFuture::makeReadyVoidFuture(), QtConcurrent::ThreadEngine< T >::startAsynchronously(), and QtPrivate::UnwrapHandler::unwrapImpl().

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

◆ reportSuspended()

void QFutureInterfaceBase::reportSuspended ( ) const

Definition at line 153 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 618 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 314 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 582 of file qfutureinterface.cpp.

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

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

+ Here is the caller graph for this function:

◆ resultStoreBase() [2/2]

◆ rethrowPossibleException()

void QFutureInterfaceBase::rethrowPossibleException ( )
protected

Definition at line 626 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 863 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::Cleaned, d, 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 822 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 827 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::Cleaned, d, isFinished(), lock, and qWarning.

+ Here is the call graph for this function:

◆ setExpectedResultCount()

void QFutureInterfaceBase::setExpectedResultCount ( int  resultCount)

Definition at line 386 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 495 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 888 of file qfutureinterface.cpp.

References d.

◆ 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 518 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 529 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 540 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 480 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::runnable.

◆ setSuspended()

void QFutureInterfaceBase::setSuspended ( bool  suspend)

Definition at line 127 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().

Referenced by QFutureWatcherBase::resume(), QFutureWatcherBase::setSuspended(), and QFutureWatcherBase::suspend().

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

◆ setThreadPool()

void QFutureInterfaceBase::setThreadPool ( QThreadPool pool)

Definition at line 485 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_pool, and pool.

◆ setThrottled()

void QFutureInterfaceBase::setThrottled ( bool  enable)

Definition at line 167 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 602 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 490 of file qfutureinterface.cpp.

References QFutureInterfaceBasePrivate::m_pool.

◆ toggleSuspended()

void QFutureInterfaceBase::toggleSuspended ( )

Definition at line 140 of file qfutureinterface.cpp.

References QBasicAtomicInteger< T >::loadRelaxed(), QFutureInterfaceBasePrivate::m_mutex, QFutureInterfaceBasePrivate::pausedWaitCondition, QFutureCallOutEvent::Resumed, QFutureInterfaceBasePrivate::sendCallOut(), QFutureInterfaceBasePrivate::state, Suspending, QFutureCallOutEvent::Suspending, switch_off(), switch_on(), and QWaitCondition::wakeAll().

Referenced by QFutureWatcherBase::toggleSuspended().

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

◆ waitForFinished()

void QFutureInterfaceBase::waitForFinished ( )

Definition at line 435 of file qfutureinterface.cpp.

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

Referenced by QFutureWatcherBase::waitForFinished().

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

◆ waitForNextResult()

bool QFutureInterfaceBase::waitForNextResult ( )

Definition at line 239 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 411 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 245 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 167 of file qfutureinterface.h.

◆ QFutureWatcherBasePrivate

friend class QFutureWatcherBasePrivate
friend

Definition at line 168 of file qfutureinterface.h.

◆ QPromise

template<class T >
friend class QPromise
friend

Definition at line 184 of file qfutureinterface.h.

◆ QtPrivate::CanceledHandler

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

Definition at line 174 of file qfutureinterface.h.

◆ QtPrivate::Continuation

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

Definition at line 171 of file qfutureinterface.h.

◆ QtPrivate::FailureHandler

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

Definition at line 178 of file qfutureinterface.h.

◆ QtPrivate::QBasicFutureWatcher

friend class QtPrivate::QBasicFutureWatcher
friend

Definition at line 181 of file qfutureinterface.h.


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