Skip to content

Commit 76ac33e

Browse files
Janosch MachowinskiJanosch Machowinski
authored andcommitted
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]>
1 parent 85f1c48 commit 76ac33e

File tree

2 files changed

+334
-128
lines changed

2 files changed

+334
-128
lines changed

0 commit comments

Comments
 (0)