-
Notifications
You must be signed in to change notification settings - Fork 6
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
local tracking for subscription_count concern #9
Comments
In a similar vein, the wait method at the bottom of functions.hpp does not detach conditions for services and clients. Is that by design? |
No, not by design... looks like the detach_condition() call should be added to the services and clients blocks. |
In that same method, I find this code (repeated in several places) kind of scary: // if client condition is not found in the active set
// reset the subscriber handle
if (!(j < active_conditions.size())) {
clients->clients[i] = 0;
} Isn't that a pointer being set to null? Who handles the cleanup on that object? And just before that code is an O(n) search (repeated in there several places) that seems it could be replaced by a comparison on the |
The calling code uses the pointers in the array, after calling rmw_wait(), as an indicator of which one[s] triggered their condition. Setting the entry to null removes the entry from further consideration. The caller must maintain the full set of subscriptions, services, etc, so there should be no concern for memory leak... |
To be clear, @ClarkTucker , are you planning to put in a fix for the missing Second, to close this out, I need to understand if you agree that the places in functions.hpp where we iterate with a |
Yes, I'll merge the missing detach_conditions(). [just done] I don't feel qualified to answer your questions concerning the behavior of the code that calls rmw_coredx::wait(). We simply mimicked the other rmw implementations... |
I'm opening this for local tracking of the issue here: ros2/ros2#352
I'm not sure if it concerns rmw_coredx or not; I'm not sure how the subscription array is being managed.
The text was updated successfully, but these errors were encountered: