| 24 | volatile int recursion = 0; |
| 25 | |
| 26 | void lockForegroundMutexInternal() |
| 27 | { |
| 28 | if (holderThread == QThread::currentThread()) { |
| 29 | // We already have the mutex |
| 30 | ++recursion; |
| 31 | } else { |
| 32 | internalMutex.lock(); |
| 33 | Q_ASSERT(recursion == 0 && holderThread == nullptr); |
| 34 | holderThread = QThread::currentThread(); |
| 35 | recursion = 1; |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | bool tryLockForegroundMutexInternal(int interval = 0) |
| 40 | { |
no test coverage detected