We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e74b07d commit 0d54c67Copy full SHA for 0d54c67
concurrentqueue.h
@@ -1604,7 +1604,7 @@ class ConcurrentQueue
1604
}
1605
else {
1606
// Increment counter
1607
- auto prevVal = elementsCompletelyDequeued.fetch_add(1, std::memory_order_release);
+ auto prevVal = elementsCompletelyDequeued.fetch_add(1, std::memory_order_acq_rel);
1608
assert(prevVal < BLOCK_SIZE);
1609
return prevVal == BLOCK_SIZE - 1;
1610
@@ -1627,7 +1627,7 @@ class ConcurrentQueue
1627
1628
1629
1630
- auto prevVal = elementsCompletelyDequeued.fetch_add(count, std::memory_order_release);
+ auto prevVal = elementsCompletelyDequeued.fetch_add(count, std::memory_order_acq_rel);
1631
assert(prevVal + count <= BLOCK_SIZE);
1632
return prevVal + count == BLOCK_SIZE;
1633
0 commit comments