aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/queue.h')
-rw-r--r--include/salticidae/queue.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/salticidae/queue.h b/include/salticidae/queue.h
index 9045e2b..0b493ea 100644
--- a/include/salticidae/queue.h
+++ b/include/salticidae/queue.h
@@ -105,7 +105,7 @@ class MPMCQueue {
void _enqueue(Block *nblk, U &&e) {
new (&(nblk->elem)) T(std::forward<U>(e));
nblk->next.store(nullptr, std::memory_order_release);
- auto prev = tail.exchange(nblk, std::memory_order_relaxed);
+ auto prev = tail.exchange(nblk, std::memory_order_acq_rel);
prev->next.store(nblk, std::memory_order_relaxed);
}