Skip to content

Commit

Permalink
signal only one
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Jan 31, 2024
1 parent 294df85 commit d97edc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/lockfree_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ class RingChannel : public QueueType {
while (!push(x)) {
Pause::pause();
}
queue_sem.signal(idler.load(std::memory_order_acquire));
if (idler.load(std::memory_order_acquire))
queue_sem.signal(1);
}
T recv() {
T x;
Expand Down

0 comments on commit d97edc3

Please sign in to comment.