| 420 | /// starts, an locked again as soon as the wait operation is finished. |
| 421 | template <class _mutexT> |
| 422 | inline void wait(_mutexT &aMutex) |
| 423 | { |
| 424 | #if defined(_TTHREAD_WIN32_) |
| 425 | // Increment number of waiters |
| 426 | EnterCriticalSection(&mWaitersCountLock); |
| 427 | ++ mWaitersCount; |
| 428 | LeaveCriticalSection(&mWaitersCountLock); |
| 429 | |
| 430 | // Release the mutex while waiting for the condition (will decrease |
| 431 | // the number of waiters when done)... |
| 432 | aMutex.unlock(); |
| 433 | _wait(); |
| 434 | aMutex.lock(); |
| 435 | #else |
| 436 | pthread_cond_wait(&mHandle, &aMutex.mHandle); |
| 437 | #endif |
| 438 | } |
| 439 | |
| 440 | /// Notify one thread that is waiting for the condition. |
| 441 | /// If at least one thread is blocked waiting for this condition variable, |
no test coverage detected