Skip to content

Commit

Permalink
Refs 10731. Protect the notification with the mutex
Browse files Browse the repository at this point in the history
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
  • Loading branch information
IkerLuengo committed Mar 23, 2021
1 parent f8e5b04 commit 562e58a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cpp/rtps/DataSharing/DataSharingNotification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class DataSharingNotification
*/
inline void notify()
{
std::unique_lock<Segment::mutex> lock(notification_->notification_mutex);
notification_->new_data.store(true);
lock.unlock();
notification_->notification_cv.notify_all();
}

Expand Down

0 comments on commit 562e58a

Please sign in to comment.