Skip to content

Commit

Permalink
Merge pull request #126 from AtariDreams/patch-1
Browse files Browse the repository at this point in the history
Fix the failure memory order argument to atomic_compare_exchange_strong explicit
  • Loading branch information
cjcchen authored Dec 29, 2023
2 parents ad7abb8 + 43a30b3 commit 295d1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/common/queue/lock_free_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LockFreeQueue {
bool old_v = true;
if (need_notify_.compare_exchange_strong(old_v, false,
std::memory_order_acq_rel,
std::memory_order_acq_rel)) {
std::memory_order_acquire)) {
std::lock_guard<std::mutex> lk(mutex_);
cv_.notify_all();
return;
Expand Down

0 comments on commit 295d1b9

Please sign in to comment.