summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-18 13:22:35 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-01-19 06:21:34 +0000
commitc20920fbe150275e12e864db79dd9665b322b0f7 (patch)
tree50c92cdf54fd1e5759b311b178eab0350d8f9345 /src/corelib/thread/qfutureinterface_p.h
parent4d5803775a40b35da77c886f4ebf13d04df214aa (diff)
QFutureInterface: add missing mutex lock to progress getters
These variables are accessed from both the executing thread as well as the thread waiting for results. Note for some variables which threads access them. Change-Id: I1c84ddff92585abb32341c42072106066e485f7e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qfutureinterface_p.h')
-rw-r--r--src/corelib/thread/qfutureinterface_p.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/thread/qfutureinterface_p.h b/src/corelib/thread/qfutureinterface_p.h
index 2321ce8d72..e2d588cd07 100644
--- a/src/corelib/thread/qfutureinterface_p.h
+++ b/src/corelib/thread/qfutureinterface_p.h
@@ -146,18 +146,20 @@ public:
QAtomicInt m_refCountT;
};
+ // T: accessed from executing thread
+ // Q: accessed from the waiting/querying thread
RefCount refCount;
mutable QMutex m_mutex;
QWaitCondition waitCondition;
QList<QFutureCallOutInterface *> outputConnections;
- int m_progressValue;
- int m_progressMinimum;
- int m_progressMaximum;
+ int m_progressValue; // TQ
+ int m_progressMinimum; // TQ
+ int m_progressMaximum; // TQ
QFutureInterfaceBase::State state;
QElapsedTimer progressTime;
QWaitCondition pausedWaitCondition;
QtPrivate::ResultStoreBase m_results;
- bool manualProgress;
+ bool manualProgress; // only accessed from executing thread
int m_expectedResultCount;
QtPrivate::ExceptionStore m_exceptionStore;
QString m_progressText;