summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthreadpool.cpp5
-rw-r--r--src/corelib/thread/qthreadpool_p.h11
2 files changed, 6 insertions, 10 deletions
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index f3ce1f258f..71310b0ebf 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -154,11 +154,6 @@ void QThreadPoolThread::registerThreadInactive()
\internal
*/
QThreadPoolPrivate:: QThreadPoolPrivate()
- : isExiting(false),
- expiryTimeout(30000),
- maxThreadCount(qAbs(QThread::idealThreadCount())),
- reservedThreads(0),
- activeThreads(0)
{ }
bool QThreadPoolPrivate::tryStart(QRunnable *task)
diff --git a/src/corelib/thread/qthreadpool_p.h b/src/corelib/thread/qthreadpool_p.h
index 4a9f9e5cfa..0eff69d440 100644
--- a/src/corelib/thread/qthreadpool_p.h
+++ b/src/corelib/thread/qthreadpool_p.h
@@ -53,6 +53,7 @@
//
#include "QtCore/qmutex.h"
+#include "QtCore/qthread.h"
#include "QtCore/qwaitcondition.h"
#include "QtCore/qset.h"
#include "QtCore/qqueue.h"
@@ -91,11 +92,11 @@ public:
QVector<QPair<QRunnable *, int> > queue;
QWaitCondition noActiveThreads;
- bool isExiting;
- int expiryTimeout;
- int maxThreadCount;
- int reservedThreads;
- int activeThreads;
+ int expiryTimeout = 30000;
+ int maxThreadCount = QThread::idealThreadCount();
+ int reservedThreads = 0;
+ int activeThreads = 0;
+ bool isExiting = false;
};
QT_END_NAMESPACE