From 3ade1b98cd94d41ed7ed2f0a84a51a4198147136 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Thu, 27 Jun 2024 14:23:44 -0400 Subject: [PATCH] Make has_triggered a regular boolean. (#218) Since it is protected by the mutex now, there is no reason to also make it an atomic (it just makes it slower). Signed-off-by: Chris Lalancette --- rmw_zenoh_cpp/src/detail/guard_condition.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/guard_condition.hpp b/rmw_zenoh_cpp/src/detail/guard_condition.hpp index b0bfc2bb..186097bc 100644 --- a/rmw_zenoh_cpp/src/detail/guard_condition.hpp +++ b/rmw_zenoh_cpp/src/detail/guard_condition.hpp @@ -16,7 +16,6 @@ #ifndef DETAIL__GUARD_CONDITION_HPP_ #define DETAIL__GUARD_CONDITION_HPP_ -#include #include #include @@ -39,7 +38,7 @@ class GuardCondition final private: mutable std::mutex internal_mutex_; - std::atomic_bool has_triggered_; + bool has_triggered_; rmw_wait_set_data_t * wait_set_data_; }; } // namespace rmw_zenoh_cpp