| 97 | { |
| 98 | public: |
| 99 | void doInternal() override |
| 100 | { |
| 101 | // By locking the mutex, we make sure that the requester is actually waiting for the condition |
| 102 | waitMutex.lock(); |
| 103 | // Now we release the foreground lock |
| 104 | TemporarilyReleaseForegroundLock release; |
| 105 | // And signalize to the requester that we've released it |
| 106 | condition.wakeAll(); |
| 107 | // Allow the requester to actually wake up, by unlocking m_waitMutex |
| 108 | waitMutex.unlock(); |
| 109 | // Now wait until the requester is ready |
| 110 | QMutexLocker lock(&finishMutex); |
| 111 | } |
| 112 | }; |
| 113 | |
| 114 | static ForegroundReleaser releaser; |