ros2 / rmw_zenoh

RMW for ROS 2 using Zenoh as the middleware
Apache License 2.0
142 stars 29 forks source link

Fix checking of the guard condition. #204

Closed clalancette closed 2 weeks ago

clalancette commented 2 weeks ago

Previously, when we were checking if a guard condition was triggered, we would actually check and reset it. But that means that when we later on went to set the appropriate things in the wait_set, we wouldn't actually set the guard_condition true, since it was false by that point.

Instead, add in two separate methods; the one that just returns whether it is triggered, which we call when checking, and the one that checks and resets, which we call when setting it in the wait_set.