-
Notifications
You must be signed in to change notification settings - Fork 122
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
Track all waitables that are currently in a wait set #207
Comments
That is a major design decision, please file a ticket first so we can discuss this. A priori I'm not against, but I want to keep |
@nnmm well, that PR also removes |
@esteve Yes, that title is a bit sloppily worded – it's more accurate to say it modifies and generalizes |
Another option is to do what |
During some refactoring to remove
SubscriptionBase
, I noticed that the wait set currently violates the unsafe code principles: Safe code can cause undefined behavior by adding the same item to multiple wait sets in different threads and waiting on them. From thercl
docs forrcl_wait()
:We need to either make all functions that end up calling
rcl_wait()
unsafe, likerclrs::spin()
, or we need to guarantee that wait sets do not share contents. The latter could be done by having a global list of waitables that are currently in a wait set, and would be my favored approach.The text was updated successfully, but these errors were encountered: