Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ParAlg/gbbs
/ push
Method
push
pbbslib/concurrent_stack.h:111–116 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
109
size_t size() { return a.size(); }
110
111
void push(T v) {
112
Node* x = b.pop();
113
if (!x) x = (Node*)malloc(sizeof(Node));
114
x->value = v;
115
a.push(x);
116
}
117
118
std::optional<T> pop() {
119
Node* x = a.pop();
Callers
5
allocate_blocks
Method · 0.45
reserve
Method · 0.45
free
Method · 0.45
pop
Method · 0.45
afree
Method · 0.45
Calls
1
pop
Method · 0.45
Tested by
no test coverage detected