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

Method dequeue

src/run_queue.hpp:86–97  ·  view source on GitHub ↗

Precondition: `wait` must get called before `dequeue`!

Source from the content-addressed store, hash-verified

84
85 // Precondition: `wait` must get called before `dequeue`!
86 ProcessBase* dequeue()
87 {
88 synchronized (mutex) {
89 if (!processes.empty()) {
90 ProcessBase* process = processes.front();
91 processes.pop_front();
92 return process;
93 }
94 }
95
96 return nullptr;
97 }
98
99 // NOTE: this function can't be const because `synchronized (mutex)`
100 // is not const ...

Callers

nothing calls this directly

Calls 1

decomissionedMethod · 0.45

Tested by

no test coverage detected