Skip to content

Commit

Permalink
Clarify why the notify_all call is required.
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Nov 29, 2024
1 parent 67c6d92 commit f7c1174
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/DataStorm/TopicI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit f7c1174

Please sign in to comment.