-
Notifications
You must be signed in to change notification settings - Fork 421
iox-1855 Return in WaitSet::wait
if data was send before WaitSet::attachState
#1856
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
iox-1855 Return in WaitSet::wait
if data was send before WaitSet::attachState
#1856
Conversation
…hen attaching states to the WaitSet
…Set::attachState'
Codecov Report
@@ Coverage Diff @@
## master #1856 +/- ##
==========================================
- Coverage 75.42% 75.41% -0.01%
==========================================
Files 377 377
Lines 14619 14625 +6
Branches 2084 2086 +2
==========================================
+ Hits 11026 11030 +4
Misses 2961 2961
- Partials 632 634 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@elfenpiff @mossmaurice If for |
…eturn bugfix Signed-off-by: Simon Hoinkis <[email protected]>
ec40033
to
bea7318
Compare
Good point, with the changes on this PR, iceoryx/iceoryx_posh/include/iceoryx_posh/internal/popo/wait_set.inl Lines 374 to 389 in 5f4dd12
I'll further investigate. |
@budrus Turns out everything is fine. In the following scenario:
iceoryx/iceoryx_posh/include/iceoryx_posh/internal/popo/wait_set.inl Lines 326 to 355 in 5f4dd12
I'll write a separate test case for that scenario. |
@mossmaurice Thanks, I got it now. The |
…t::wait' for a 2nd time Signed-off-by: Simon Hoinkis <[email protected]>
@elBoberido @mossmaurice @budrus I just saw the PR now and it is fine like the problem is solved BUT it demonstrates that states are an abomination directly from hell. It is the wrong layer to handle this, the waitset should only handle events and the layer above (the user using the waitset) handles states if they like. This would make things much more faster and the design more readable. The responsibilities were:
With this implementation we break those clear responsibilities and the waitset suddenly triggers. But I see no better alternative. Good job @mossmaurice but we have to get rid of those states they do not make sense. |
@elfenpiff In the specific So the |
@budrus @elfenpiff I see this as layered approach. One layer provides the basics and does not even start a thread like the cc @mossmaurice |
@elBoberido You are right and with the upcoming iceoryx rust next gen version I implemented it exactly like this.
But to be clear. ROS requires it (sadly) so therefore I would implemented it somewhere between here and the end user layer so that high level users do not have to take care of this. |
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)All touched (C/C++) source code files fromiceoryx_hoofs
are added to./clang-tidy-diff-scans.txt
Notes for Reviewer
WaitSet
,isStateConditionSatisfied()
is called to see whether the state condition is still fulfilled, if so theConditionNotifier
is triggeredrmw_wait
attaches all wait-able entities just before waiting on every run (see Use new Blueberryv2.0.3
feature request-response and its discovery ros2/rmw_iceoryx#84)Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References
WaitSet::wait
does not return if data was send beforeWaitSet::attachState
#1855