From 6503c9b4e9023d1483a34a9bf6e048535b1ae8ac Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Mon, 8 Jun 2020 17:57:54 +0200 Subject: [PATCH] Lets make fast queue slower --- core-buffer/src/FastQueue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-buffer/src/FastQueue.cpp b/core-buffer/src/FastQueue.cpp index 5a59b56..69cb2c0 100644 --- a/core-buffer/src/FastQueue.cpp +++ b/core-buffer/src/FastQueue.cpp @@ -73,7 +73,7 @@ void FastQueue::commit() } write_slot_id_++; - write_slot_id_ %= n_slots_; + write_slot_id_ = write_slot_id_ % n_slots_; } template @@ -100,7 +100,7 @@ void FastQueue::release() } read_slot_id_++; - read_slot_id_ %= n_slots_; + read_slot_id_ = read_slot_id_ % n_slots_; } template class FastQueue;