MCPcopy Create free account
hub / github.com/apache/brpc / pop

Method pop

src/bthread/id.cpp:55–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54 }
55 bool pop(T* val) {
56 if (_size > 0) {
57 *val = _c[_begin];
58 ++_begin;
59 if (_begin >= N) {
60 _begin -= N;
61 }
62 --_size;
63 return true;
64 } else if (_full && !_full->empty()) {
65 *val = _full->front();
66 _full->pop_front();
67 return true;
68 }
69 return false;
70 }
71 bool empty() const {
72 return _size == 0 && (_full == NULL || _full->empty());
73 }

Callers 13

beginPipelineMethod · 0.45
executePipelineMethod · 0.45
clearPipelineMethod · 0.45
PopHeaderFunction · 0.45
AddMethod · 0.45
TryPopMethod · 0.45
id_statusFunction · 0.45
bthread_id_unlockFunction · 0.45
steal_taskMethod · 0.45
steal_taskMethod · 0.45
ending_schedMethod · 0.45
schedMethod · 0.45

Calls 3

emptyMethod · 0.45
frontMethod · 0.45
pop_frontMethod · 0.45

Tested by

no test coverage detected