Skip to content

Commit

Permalink
Declare rclcpp callbacks before the rcl entities (ros2#2024)
Browse files Browse the repository at this point in the history
This is to ensure callbacks are destroyed last
on entities destruction, avoiding the gap in time
in which rmw entities hold a reference to a
destroyed function.

Signed-off-by: Mauro Passerino <mpasserino@irobot.com>
  • Loading branch information
Mauro Passerino authored and Alberto Soragna committed Jan 30, 2024
1 parent a96cbe8 commit a9db6c8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions rclcpp/include/rclcpp/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ class ClientBase
bool use_intra_process_{false};
IntraProcessManagerWeakPtr weak_ipm_;
uint64_t intra_process_client_id_;

std::recursive_mutex callback_mutex_;
std::function<void(size_t)> on_new_response_callback_{nullptr};
};

template<typename ServiceT>
Expand Down

0 comments on commit a9db6c8

Please sign in to comment.