| 92 | } |
| 93 | |
| 94 | Event EventLog::waitForEvent(int64_t timeout) { |
| 95 | Synchronized s(monitor_); |
| 96 | |
| 97 | try { |
| 98 | while (events_.empty()) { |
| 99 | monitor_.wait(timeout); |
| 100 | } |
| 101 | } catch (const TimedOutException &) { |
| 102 | return Event(ET_LOG_END, 0, 0, ""); |
| 103 | } |
| 104 | |
| 105 | Event event = events_.front(); |
| 106 | events_.pop_front(); |
| 107 | return event; |
| 108 | } |
| 109 | |
| 110 | Event EventLog::waitForConnEvent(uint32_t connId, int64_t timeout) { |
| 111 | Synchronized s(monitor_); |
no test coverage detected