Skip to content

Commit

Permalink
Make has_triggered a regular boolean. (#218)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
clalancette authored Jun 27, 2024
1 parent a74978f commit 3ade1b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rmw_zenoh_cpp/src/detail/guard_condition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef DETAIL__GUARD_CONDITION_HPP_
#define DETAIL__GUARD_CONDITION_HPP_

#include <atomic>
#include <condition_variable>
#include <mutex>

Expand All @@ -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
Expand Down

0 comments on commit 3ade1b9

Please sign in to comment.