Precondition: `wait` must get called before `dequeue`!
| 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 ... |
nothing calls this directly
no test coverage detected