-
Notifications
You must be signed in to change notification settings - Fork 412
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
Always trigger guard condition waitset #1923
Conversation
…ack is present Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
I restored the mutex to prevent race condition that could cause problems. |
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.
lgtm with minor nit
Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
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.
Looks reasonable.
It seems like a test to avoid this regressing in the future would be good to have.
Also, if it's not already clear from the docstring what should happen in this corner case, it should be clarified there.
caa9f19
to
863fa04
Compare
Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
863fa04
to
20ce75e
Compare
This doc block should mention how it interacts with the "on trigger callback": rclcpp/rclcpp/include/rclcpp/guard_condition.hpp Lines 75 to 85 in 02802bc
And, I guess we missed it, but we should have some documentation on the "on trigger callback" method as well (it currently has none): rclcpp/rclcpp/include/rclcpp/guard_condition.hpp Lines 110 to 112 in 02802bc
|
Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
@wjwwood @fujitatomoya anything else to do here? |
@alsora i am good to go! @wjwwood could you check your comments on #1923 (comment)? |
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.
lgtm
Sorry for not re-reviewing it. I don't get notifications for pushed commits, so a comment is helpful to bump a re-review.
* trigger guard condition waitset regardless of whether a trigger callback is present Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * restore mutex in guard_condition.cpp Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * remove whitespace Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * add unit-test Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * add documentation for trigger and set_on_trigger_callback Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
Ttrigger guard condition waitset regardless of whether a trigger callback is present
This should address #1917
Also minor cleanup at the class (remove unneded lock and better use of if-else)
Signed-off-by: Alberto Soragna alberto.soragna@gmail.com