From b31b6cddf9fc1cd8715c8195d6ebb5e8e92157e0 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Wed, 6 May 2020 10:29:33 +0200 Subject: [PATCH] Fixed bug in queue slot allocation (Of course it can really happen!) --- core-buffer/src/LiveRecvModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-buffer/src/LiveRecvModule.cpp b/core-buffer/src/LiveRecvModule.cpp index e708781..1e56de1 100644 --- a/core-buffer/src/LiveRecvModule.cpp +++ b/core-buffer/src/LiveRecvModule.cpp @@ -103,7 +103,7 @@ void LiveRecvModule::receive_thread(const size_t n_modules, void* ctx_) } uint64_t current_pulse_id = 0; - auto slot_id = queue_.read(); + auto slot_id = queue_.reserve(); if (slot_id == -1) throw runtime_error("This cannot really happen"); auto metadata = queue_.get_metadata_buffer(slot_id);