From be09b62f8f8a4971934158c4a042f47512b1dcfe Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Thu, 16 Apr 2026 08:09:29 +0200 Subject: [PATCH] JFJochReceiverPlots: Add clarification of thread safety (to be improved) --- receiver/JFJochReceiverPlots.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/receiver/JFJochReceiverPlots.h b/receiver/JFJochReceiverPlots.h index 9985a10f..f1171c5d 100644 --- a/receiver/JFJochReceiverPlots.h +++ b/receiver/JFJochReceiverPlots.h @@ -62,6 +62,10 @@ class JFJochReceiverPlots { StatusVector max_value; StatusVector resolution_estimate; + // StatusVector objects are fully thread-safe (protected by internal mutex) + // It is OK to have concurrent access to StatusVector + // roi_m lock is needed to make sure that std::map is not mutable within critical section + // so no new elements added outside of a unique lock, but it is OK to modify ROIStatus under shared lock struct ROIStatus { StatusVector sum; StatusVector max_count;