diff --git a/RELEASE.md b/RELEASE.md index 0e520a2..d9c0888 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -13,6 +13,10 @@ - Removed Print/Print_some/Print_all form NDArray (operator << still works) - Added const* version of .data() +### Bugfixes: + + - multi threaded cluster finder doesnt drop frames if queues are full + ### 2025.11.21 diff --git a/include/aare/ClusterFinderMT.hpp b/include/aare/ClusterFinderMT.hpp index 42e8105..b5df766 100644 --- a/include/aare/ClusterFinderMT.hpp +++ b/include/aare/ClusterFinderMT.hpp @@ -73,8 +73,11 @@ class ClusterFinderMT { switch (frame->type) { case FrameType::DATA: cf->find_clusters(frame->data.view(), frame->frame_number); - m_output_queues[thread_id]->write( - cf->steal_clusters(realloc_same_capacity)); + while (!m_output_queues[thread_id]->write( + cf->steal_clusters(realloc_same_capacity))) { + std::this_thread::sleep_for(m_default_wait); + } + break; case FrameType::PEDESTAL: