Skip to content

Commit

Permalink
Consistently uses std::mutex rather than std::shared_mutex for state_…
Browse files Browse the repository at this point in the history
…update_mutex_.
  • Loading branch information
rr-mark committed Jan 16, 2025
1 parent 83b2359 commit 399e620
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ class MOVEIT_PLANNING_SCENE_MONITOR_EXPORT PlanningSceneMonitor
std::atomic<bool> state_update_pending_;

// Lock for writing last_robot_state_update_wall_time_ and dt_state_update_
std::shared_mutex state_update_mutex_;
std::mutex state_update_mutex_;

/// Last time the state was updated from current_state_monitor_
// Only access this from callback functions (and constructor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ void PlanningSceneMonitor::updateSceneWithCurrentState(bool skip_update_if_locke

// Update state_update_mutex_ and last_robot_state_update_wall_time_
{
std::unique_lock<std::shared_mutex> lock(state_update_mutex_);
std::unique_lock<std::mutex> lock(state_update_mutex_);
last_robot_state_update_wall_time_ = std::chrono::system_clock::now();
state_update_pending_.store(false);
}
Expand Down

0 comments on commit 399e620

Please sign in to comment.