MCPcopy Create free account
hub / github.com/3rdparty/libprocess / dequeue

Method dequeue

src/event_queue.hpp:124–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 Event* dequeue()
125 {
126 Event* event = nullptr;
127
128 synchronized (mutex) {
129 if (events.size() > 0) {
130 Event* event = events.front();
131 events.pop_front();
132 return event;
133 }
134 }
135
136 // Semantics are the consumer _must_ call `empty()` before calling
137 // `dequeue()` which means an event must be present.
138 return CHECK_NOTNULL(event);
139 }
140
141 bool empty()
142 {

Callers 1

dequeueMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected