MCPcopy Create free account
hub / github.com/apache/singa / WaitForNotification

Method WaitForNotification

test/gtest/gtest.h:2328–2337  ·  view source on GitHub ↗

Blocks until the controller thread notifies. Must be called from a test thread.

Source from the content-addressed store, hash-verified

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_;

Callers 1

RunMethod · 0.80

Calls 1

SleepMillisecondsFunction · 0.85

Tested by

no test coverage detected