Skip to content

Commit

Permalink
Fix data race in Actions: Part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Passerino committed Aug 23, 2024
1 parent 9bc4a4b commit e8d9526
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rclcpp/include/rclcpp/experimental/intra_process_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,14 @@ class IntraProcessManager
auto server = get_matching_intra_process_action_server<ActionT>(ipc_action_client_id);

if (server) {
{
std::unique_lock<std::shared_timed_mutex> lock(mutex_);
clients_uuid_to_id_[goal_id] = ipc_action_client_id;
}

server->store_ipc_action_goal_request(
ipc_action_client_id, std::move(goal_request));

std::unique_lock<std::shared_timed_mutex> lock(mutex_);
clients_uuid_to_id_[goal_id] = ipc_action_client_id;
return true;
}
return false;
Expand Down

0 comments on commit e8d9526

Please sign in to comment.