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

Method dequeue_external

src/iocore/eventsystem/ProtectedQueue.cc:64–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void
65ProtectedQueue::dequeue_external()
66{
67 Event *e = static_cast<Event *>(ink_atomiclist_popall(&al));
68 // invert the list, to preserve order
69 SLL<Event, Event::Link_link> l, t;
70 t.head = e;
71 while ((e = t.pop())) {
72 l.push(e);
73 }
74 // insert into localQueue
75 while ((e = l.pop())) {
76 if (!e->cancelled) {
77 localQueue.enqueue(e);
78 } else {
79 e->mutex = nullptr;
80 eventAllocator.free(e);
81 }
82 }
83}
84
85void
86ProtectedQueue::wait(ink_hrtime timeout)

Callers 1

UnixEThread.ccFile · 0.80

Calls 5

ink_atomiclist_popallFunction · 0.85
popMethod · 0.45
pushMethod · 0.45
enqueueMethod · 0.45
freeMethod · 0.45

Tested by

no test coverage detected