-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add unique_lock implementation with clang thread safety annotations #180
Conversation
Probably needs a test |
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.
having this in rcpputil makes sense, test would be ideal.
And just for verification, it looks like using this instead of |
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.
I've left a possible bug inline.
As far as a test goes, I'm actually not entirely sure what we would test here. More-or-less it would be testing whether std::unique_lock
works. Any thoughts from @emersonknapp or @fujitatomoya on what kind of test you think we should do?
@clalancette that is actually good question. i was thinking that we can simulate https://ci.ros2.org/view/nightly/job/nightly_linux_clang_libcxx/1628/clang/new/source.cf52365c-c9dc-4c3e-8639-55ffa17e1b64/#115 but it actually is the test for we could test |
@emersonknapp When you get a chance, can you rebase this to fix the DCO bot? |
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com> Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
1b69b93
to
729887a
Compare
Added a simple compile-test that we can use multiple types of mutex. |
Pulls: #180 |
Can be used to replace rosbag2 implementation https://github.com/ros2/rosbag2/blob/rolling/rosbag2_cpp/src/rosbag2_cpp/clocks/time_controller_clock.cpp#L31
and false positive errors in RMW builds like https://ci.ros2.org/view/nightly/job/nightly_linux_clang_libcxx/1628/clang/new/source.cf52365c-c9dc-4c3e-8639-55ffa17e1b64/#115