Blocks until the controller thread notifies. Must be called from a test thread.
| 2326 | // Blocks until the controller thread notifies. Must be called from a test |
| 2327 | // thread. |
| 2328 | void WaitForNotification() { |
| 2329 | for (;;) { |
| 2330 | pthread_mutex_lock(&mutex_); |
| 2331 | const bool notified = notified_; |
| 2332 | pthread_mutex_unlock(&mutex_); |
| 2333 | if (notified) |
| 2334 | break; |
| 2335 | SleepMilliseconds(10); |
| 2336 | } |
| 2337 | } |
| 2338 | |
| 2339 | private: |
| 2340 | pthread_mutex_t mutex_; |
no test coverage detected