MCPcopy Create free account
hub / github.com/apache/mesos / dequeue

Method dequeue

3rdparty/libprocess/src/process.cpp:3350–3369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3348
3349
3350ProcessBase* ProcessManager::dequeue()
3351{
3352 // TODO(benh): Remove a process from this thread's runq. If there
3353 // are no processes to run, and this is not a dedicated thread, then
3354 // steal one from another threads runq.
3355
3356 running.fetch_sub(1);
3357
3358 runq.wait();
3359
3360 // Need to increment `running` before we dequeue from `runq` so that
3361 // `Clock::settle` properly waits.
3362 running.fetch_add(1);
3363
3364 ////////////////////////////////////////////////////////////
3365 // NOTE: contract with the run queue is that we'll always //
3366 // call `wait` _BEFORE_ we call `dequeue`. //
3367 ////////////////////////////////////////////////////////////
3368 return runq.dequeue();
3369}
3370
3371
3372// NOTE: it's possible that a thread not controlled by libprocess is

Callers 7

resumeMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
gFunction · 0.45
aFunction · 0.45

Calls 1

waitMethod · 0.45

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36