Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Pass timeout to rmw_wait#60

Merged
jacquelinekay merged 1 commit intomasterfrom
wait_timeout
Aug 5, 2015
Merged

Pass timeout to rmw_wait#60
jacquelinekay merged 1 commit intomasterfrom
wait_timeout

Conversation

@jacquelinekay
Copy link
Copy Markdown
Contributor

Connects to ros2/ros2#73

@jacquelinekay jacquelinekay added the in progress Actively being worked on (Kanban column) label Jul 24, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function must check that the pointer is valid (if it stay a pointers).
(Actually it should also check all the other pointers coming in.)

Same below and for OpenSplice.

@dirk-thomas
Copy link
Copy Markdown
Member

This needs a rebase since the commit list contains other commits.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double posting comment from ros2/rmw_opensplice#55:

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_INFINITE to WaitSet::Wait.
  • If positive: pass the timeout value to WaitSet::wait and return if timed out.
  • If non-blocking: same behavior as before.

@dirk-thomas
Copy link
Copy Markdown
Member

+1

@jacquelinekay jacquelinekay force-pushed the wait_timeout branch 2 times, most recently from 52c82cb to a8858b2 Compare July 31, 2015 18:20
@esteve
Copy link
Copy Markdown
Member

esteve commented Aug 4, 2015

+1

1 similar comment
@wjwwood
Copy link
Copy Markdown
Member

wjwwood commented Aug 4, 2015

+1

@tfoote
Copy link
Copy Markdown
Contributor

tfoote commented Aug 4, 2015

+1 with rebase/squash

jacquelinekay added a commit that referenced this pull request Aug 5, 2015
@jacquelinekay jacquelinekay merged commit 75b4d17 into master Aug 5, 2015
@jacquelinekay jacquelinekay removed the in progress Actively being worked on (Kanban column) label Aug 5, 2015
@jacquelinekay jacquelinekay deleted the wait_timeout branch August 5, 2015 02:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants