diff options
Diffstat (limited to 'src/corelib/thread/qfutureinterface.h')
| -rw-r--r-- | src/corelib/thread/qfutureinterface.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index 01d2f595aeb..0b88013800e 100644 --- a/src/corelib/thread/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -445,12 +445,11 @@ inline QList<T> QFutureInterface<T>::results() template<typename T> T QFutureInterface<T>::takeResult() { - Q_ASSERT(isValid()); - // Note: we wait for all, this is intentional, // not to mess with other unready results. waitForResult(-1); + Q_ASSERT(isValid()); Q_ASSERT(!hasException()); const QMutexLocker<QMutex> locker{&mutex()}; @@ -466,10 +465,9 @@ T QFutureInterface<T>::takeResult() template<typename T> std::vector<T> QFutureInterface<T>::takeResults() { - Q_ASSERT(isValid()); - waitForResult(-1); + Q_ASSERT(isValid()); Q_ASSERT(!hasException()); std::vector<T> res; |
