Skip to content

Commit

Permalink
fix: memory ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperPaul123 committed Sep 29, 2023
1 parent 9e3d43b commit 12f7091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/thread_pool/work_stealing_deque.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace dp {

if (top < bottom) {
// non-empty queue
auto buffer = buffer_.load(release);
auto buffer = buffer_.load(acquire);
auto temp = buffer->load(top, acquire);
if (!top_.compare_exchange_strong(top, top + 1, seq_cst, relaxed)) {
// failed the race
Expand Down

0 comments on commit 12f7091

Please sign in to comment.