Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cameron314/readerwriterqueue
/ enqueue
Method
enqueue
benchmarks/ext/1024cores/spscqueue.h:68–75 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
66
}
67
68
void enqueue(T v)
69
{
70
node* n = alloc_node();
71
n->next_ = 0;
72
n->value_ = v;
73
store_release(&head_->next_, n);
74
head_ = n;
75
}
76
77
// returns
'false'
if queue is empty
78
bool try_dequeue(T& v)
Callers
12
BlockingReaderWriterQueue
Class · 0.45
main
Function · 0.45
enqueue_one
Method · 0.45
enqueue_many
Method · 0.45
nonempty_destroy
Method · 0.45
threaded
Method · 0.45
peek
Method · 0.45
pop
Method · 0.45
size_approx
Method · 0.45
max_capacity
Method · 0.45
blocking
Method · 0.45
vector
Method · 0.45
Calls
1
store_release
Function · 0.85
Tested by
11
main
Function · 0.36
enqueue_one
Method · 0.36
enqueue_many
Method · 0.36
nonempty_destroy
Method · 0.36
threaded
Method · 0.36
peek
Method · 0.36
pop
Method · 0.36
size_approx
Method · 0.36
max_capacity
Method · 0.36
blocking
Method · 0.36
vector
Method · 0.36