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

Method pop

src/bthread/remote_task_queue.h:51–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50
51 bool pop(bthread_t* task) {
52 if (_tasks.empty()) {
53 return false;
54 }
55 _mutex.lock();
56 const bool result = _tasks.pop(task);
57 _mutex.unlock();
58 return result;
59 }
60
61 bool push(bthread_t task) {
62 _mutex.lock();

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected