Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rclcpp_action): Fixed race condition in Client
Some background information: is_ready, take_data and execute data may be called from different threads in any order. The code in the old state expected them to be called in series, without interruption. This lead to multiple race conditions, as the state of the pimpl objects was altered by the three functions in a non thread safe way. This commit fixed this by - Introducing a data queue that is filled in is_ready - take_data from now only pops the front element of the data queue - A backlog of events if held in num_unreported_events_ which will be reported by future calls of is_ready Signed-off-by: Janosch Machowinski <[email protected]>
- Loading branch information