From f7c1174d073dc4615178546168ebfb222226987a Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 29 Nov 2024 17:35:02 +0100 Subject: [PATCH] Clarify why the notify_all call is required. --- cpp/src/DataStorm/TopicI.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/DataStorm/TopicI.cpp b/cpp/src/DataStorm/TopicI.cpp index 721c02afe26..eec2ac91795 100644 --- a/cpp/src/DataStorm/TopicI.cpp +++ b/cpp/src/DataStorm/TopicI.cpp @@ -754,6 +754,7 @@ TopicI::waitForListeners(int count) const } _cond.wait(lock); ++_notified; + // Ensure that notifyListenerWaiters checks the wait condition after _notified is incremented. _cond.notify_all(); } }