diff options
Diffstat (limited to 'src/corelib/thread/qthreadpool_p.h')
-rw-r--r-- | src/corelib/thread/qthreadpool_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/thread/qthreadpool_p.h b/src/corelib/thread/qthreadpool_p.h index f967880bde..7910592f70 100644 --- a/src/corelib/thread/qthreadpool_p.h +++ b/src/corelib/thread/qthreadpool_p.h @@ -128,12 +128,13 @@ public: { return qMax(requestedMaxThreadCount, 1); } // documentation says we start at least one 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); + static QThreadPool *qtGuiInstance(); + mutable QMutex mutex; QSet<QThreadPoolThread *> allThreads; QQueue<QThreadPoolThread *> waitingThreads; @@ -142,7 +143,7 @@ public: QWaitCondition noActiveThreads; QString objectName; - int expiryTimeout = 30000; + std::chrono::duration<int, std::milli> expiryTimeout = std::chrono::seconds(30); int requestedMaxThreadCount = QThread::idealThreadCount(); // don't use this directly int reservedThreads = 0; int activeThreads = 0; |