| 83 | } |
| 84 | |
| 85 | void |
| 86 | ProtectedQueue::wait(ink_hrtime timeout) |
| 87 | { |
| 88 | /* If there are no external events available, will do a cond_timedwait. |
| 89 | * |
| 90 | * - The `EThread::lock` will be released, |
| 91 | * - And then the Event Thread goes to sleep and waits for the wakeup signal of `EThread::might_have_data`, |
| 92 | * - The `EThread::lock` will be locked again when the Event Thread wakes up. |
| 93 | */ |
| 94 | if (INK_ATOMICLIST_EMPTY(al) && localQueue.empty()) { |
| 95 | timespec ts = ink_hrtime_to_timespec(timeout); |
| 96 | ink_cond_timedwait(&might_have_data, &lock, &ts); |
| 97 | } |
| 98 | } |
nothing calls this directly
no test coverage detected