summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool_p.h
diff options
context:
space:
mode:
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