summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool_p.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
commit6630937e63ae5797487b86743a7733c8ae5cc42c (patch)
tree3d53dacf6430f9099e1fb20835881205de674961 /src/corelib/thread/qthreadpool_p.h
parent37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff)
parentc7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff)
Merge commit 'dev' into 'wip/cmake-merge'
Diffstat (limited to 'src/corelib/thread/qthreadpool_p.h')
-rw-r--r--src/corelib/thread/qthreadpool_p.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/thread/qthreadpool_p.h b/src/corelib/thread/qthreadpool_p.h
index 0e6a00d243..01852d8366 100644
--- a/src/corelib/thread/qthreadpool_p.h
+++ b/src/corelib/thread/qthreadpool_p.h
@@ -63,6 +63,8 @@ QT_REQUIRE_CONFIG(thread);
QT_BEGIN_NAMESPACE
+class QDeadlineTimer;
+
class QueuePage {
public:
enum {
@@ -160,15 +162,16 @@ public:
void tryToStartMoreThreads();
bool tooManyThreadsActive() const;
- void startThread(QRunnable *runnable = 0);
+ void startThread(QRunnable *runnable = nullptr);
void reset();
bool waitForDone(int msecs);
+ bool waitForDone(const QDeadlineTimer &timer);
void clear();
void stealAndRunRunnable(QRunnable *runnable);
void deletePageIfFinished(QueuePage *page);
mutable QMutex mutex;
- QList<QThreadPoolThread *> allThreads;
+ QSet<QThreadPoolThread *> allThreads;
QQueue<QThreadPoolThread *> waitingThreads;
QQueue<QThreadPoolThread *> expiredThreads;
QVector<QueuePage*> queue;
@@ -179,7 +182,6 @@ public:
int reservedThreads = 0;
int activeThreads = 0;
uint stackSize = 0;
- bool isExiting = false;
};
QT_END_NAMESPACE