MCPcopy Create free account
hub / github.com/apache/trafficserver / wait

Method wait

src/iocore/eventsystem/ProtectedQueue.cc:85–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void
86ProtectedQueue::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}

Callers

nothing calls this directly

Calls 3

ink_hrtime_to_timespecFunction · 0.85
ink_cond_timedwaitFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected