From 44477d44532f36353d99350fac045986a4d84198 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Mon, 8 Jun 2020 17:56:04 +0200 Subject: [PATCH] Make id counters atomic --- core-buffer/include/FastQueue.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-buffer/include/FastQueue.hpp b/core-buffer/include/FastQueue.hpp index 4103c55..95c1331 100644 --- a/core-buffer/include/FastQueue.hpp +++ b/core-buffer/include/FastQueue.hpp @@ -12,8 +12,8 @@ class FastQueue { char* buffer_; std::atomic_int* buffer_status_; - uint16_t write_slot_id_; - uint16_t read_slot_id_; + std::atomic_uint16_t write_slot_id_; + std::atomic_uint16_t read_slot_id_; public: