diff options
Diffstat (limited to 'src/corelib/thread/qthreadpool.h')
| -rw-r--r-- | src/corelib/thread/qthreadpool.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/corelib/thread/qthreadpool.h b/src/corelib/thread/qthreadpool.h index 8f0130bd843..0640f415872 100644 --- a/src/corelib/thread/qthreadpool.h +++ b/src/corelib/thread/qthreadpool.h @@ -72,7 +72,9 @@ public: void reserveThread(); void releaseThread(); - bool waitForDone(int msecs = -1); + QT_CORE_INLINE_SINCE(6, 8) + bool waitForDone(int msecs); + bool waitForDone(QDeadlineTimer deadline = QDeadlineTimer::Forever); void clear(); @@ -103,6 +105,13 @@ void QThreadPool::startOnReservedThread(Callable &&functionToRun) startOnReservedThread(QRunnable::create(std::forward<Callable>(functionToRun))); } +#if QT_CORE_INLINE_IMPL_SINCE(6, 8) +bool QThreadPool::waitForDone(int msecs) +{ + return waitForDone(QDeadlineTimer(msecs)); +} +#endif + QT_END_NAMESPACE #endif |
