-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure all Clock accesses are thread-safe #999
Conversation
It would be good to keep these two changes (PIMPL and adding a mutex) separate since together in a single commit it just makes the review harder. |
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
2375505
to
f4ff7f1
Compare
@dirk-thomas fair enough, see a91ba82 and f4ff7f1. |
This is an alternative PR to #999 The code in this one is less nice, but it is ABI-safe. Thus, it can be used as a short-term workaround for users hurt by the problem now, and/or used as the solution for Eloquent. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside a nitpick looks good to me. Maybe merge without squashing to keep the two commits separate?
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
f4ff7f1
to
79455ee
Compare
Alright, going in! |
This is an alternative PR to #999 The code in this one is less nice, but it is ABI-safe. Thus, it can be used as a short-term workaround for users hurt by the problem now, and/or used as the solution for Eloquent. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is an alternative PR to #999 The code in this one is less nice, but it is ABI-safe. Thus, it can be used as a short-term workaround for users hurt by the problem now, and/or used as the solution for Eloquent. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is an alternative PR to #999 The code in this one is less nice, but it is ABI-safe. Thus, it can be used as a short-term workaround for users hurt by the problem now, and/or used as the solution for Eloquent. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Precisely what the title says. Before this patch, both
rclcpp::Clock
andrclcpp::TimerBase
(though indirectly throughrcl
) would access non thread-safercl_clock_*
API without locking, leading to internal state corruption on concurrent access in multi-threaded applications.This change is ABI breaking w.r.t. to previous distro releases (e.g. Eloquent) but sets the scene for future non ABI breaking changes using a PIMPL.