introduce time struct, add timeout duration to rmw_wait#25
introduce time struct, add timeout duration to rmw_wait#25jacquelinekay merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
I think wait_timeout doesn't need to be a pointer here, we can just pass copies of rmw_time_t
|
+1 |
rmw/include/rmw/types.h
Outdated
There was a problem hiding this comment.
Since negative values will be used to represent blocking indefinitely (or nonblocking), I could change this struct to signed integers. Alternatively, I could check for a negative duration in rclcpp and pass a bool that stores "block indefinitely" or "nonblocking" to rmw_wait, along with the timeout.
There was a problem hiding this comment.
So, I looked at how select() works and it takes the struct as a pointer and a NULL pointer is block forever. So maybe we should do it that way. Changing this to a signed number is not a great option in my opinion. The bool is probably my next favorite option.
There was a problem hiding this comment.
Also we could instead call this the rmw_timeout_t and include a bool as part of the struct which indicates forever.
There was a problem hiding this comment.
I like the idea to be similar to select().
4d511c1 to
db3bb3b
Compare
rmw/include/rmw/rmw.h
Outdated
|
+1 |
1 similar comment
|
+1 |
|
+1 squashed |
ee48821 to
d4c1564
Compare
introduce time struct, add timeout duration to rmw_wait
Connects to ros2/ros2#73