This repository was archived by the owner on Oct 7, 2021. It is now read-only.
Merged
Conversation
Member
|
This needs a rebase since the commit list contains other commits. |
366017b to
2eac487
Compare
rmw_opensplice_cpp/src/functions.cpp
Outdated
Contributor
Author
There was a problem hiding this comment.
As I was writing a test for this, I realized that the existing logic of this loop is not what I thought it was.
Old behavior:
- Get "blocking" or "non-blocking in rclcpp.
- In rmw implementation:
- if non-blocking, call rmw_wait with a timeout of zero, and don't loop if timed out.
- if blocking: while return code is timeout, wait for 1 second. throw if error, continue if retcode was not timeout. The executor will always block indefinitely inside of rmw_wait.
Here's what I think the new behavior should be:
Get timeout from rclcpp.
- If NULL: block indefinitely in rmw_wait, by passing
DURATION_INFINITEtoWaitSet::Wait. - If positive: pass the timeout value to
WaitSet::waitand return if timed out. - If non-blocking: same behavior as before.
Thoughts on this? (@wjwwood?)
Member
There was a problem hiding this comment.
We discussed this off-line, and it seems that the DURATION_INFINITE is the right approach, since no additional checks are being done in the busy wait loop anyways. We're relying on our guard condition to wake the waitset up in an exit condition.
bfa7120 to
b88ac7d
Compare
Member
|
+1 |
30ccd21 to
f3fd42a
Compare
Member
|
+1 |
1 similar comment
Member
|
+1 |
Contributor
|
+1 with squash/rebase |
f3fd42a to
158b3e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connects to ros2/ros2#73