summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface_p.h
diff options
context:
space:
mode:
authorQt CI Bot <qt_ci_bot@qt-project.org>2021-03-22 16:45:12 +0000
committerQt CI Bot <qt_ci_bot@qt-project.org>2021-03-22 16:45:12 +0000
commitf5e300bf6ae17de6f8c69167c219d5836cdb7954 (patch)
tree667782b8eeeeeee6840ec2596ba5e5c66dd12673 /src/corelib/thread/qfutureinterface_p.h
parente8c3fc7c4364935d40195baf163777bf01757b13 (diff)
parentabd7496fba00a9de5f4c6e1ab9696f0679b8fac3 (diff)
Merge integration refs/builds/qtci/dev/1616415197
Diffstat (limited to 'src/corelib/thread/qfutureinterface_p.h')
-rw-r--r--src/corelib/thread/qfutureinterface_p.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/corelib/thread/qfutureinterface_p.h b/src/corelib/thread/qfutureinterface_p.h
index 28dc4be263..44c3a48d2a 100644
--- a/src/corelib/thread/qfutureinterface_p.h
+++ b/src/corelib/thread/qfutureinterface_p.h
@@ -161,23 +161,30 @@ public:
// T: accessed from executing thread
// Q: accessed from the waiting/querying thread
- RefCount refCount;
mutable QMutex m_mutex;
- QWaitCondition waitCondition;
+ QBasicMutex continuationMutex;
QList<QFutureCallOutInterface *> outputConnections;
- int m_progressValue; // TQ
- int m_progressMinimum; // TQ
- int m_progressMaximum; // TQ
- QAtomicInt state; // reads and writes can happen unprotected, both must be atomic
QElapsedTimer progressTime;
+ QWaitCondition waitCondition;
QWaitCondition pausedWaitCondition;
+ // ### TODO: put m_results and m_exceptionStore into a union (see QTBUG-92045)
QtPrivate::ResultStoreBase m_results;
- bool manualProgress; // only accessed from executing thread
- int m_expectedResultCount;
QtPrivate::ExceptionStore m_exceptionStore;
QString m_progressText;
- QRunnable *runnable;
- QThreadPool *m_pool;
+ QRunnable *runnable = nullptr;
+ QThreadPool *m_pool = nullptr;
+ // Wrapper for continuation
+ std::function<void(const QFutureInterfaceBase &)> continuation;
+
+ RefCount refCount = 1;
+ QAtomicInt state; // reads and writes can happen unprotected, both must be atomic
+ int m_progressValue = 0; // TQ
+ int m_progressMinimum = 0; // TQ
+ int m_progressMaximum = 0; // TQ
+ int m_expectedResultCount = 0;
+ bool manualProgress = false; // only accessed from executing thread
+ bool launchAsync = false;
+ bool isValid = false;
inline QThreadPool *pool() const
{ return m_pool ? m_pool : QThreadPool::globalInstance(); }
@@ -196,12 +203,6 @@ public:
void setState(QFutureInterfaceBase::State state);
- // Wrapper for continuation
- std::function<void(const QFutureInterfaceBase &)> continuation;
- QBasicMutex continuationMutex;
-
- bool launchAsync = false;
- bool isValid = false;
};
QT_END_NAMESPACE