-
Notifications
You must be signed in to change notification settings - Fork 237
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
Avoid a reference cycle between Node and TimeSource #488
Conversation
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
if node is None: | ||
raise RuntimeError('Attached node has gone out of scope before expected') | ||
return node | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think this case is worth raising for (trying to do an operation that requires a node, but the time source is not attached to one), and the other case of the weak reference being invalid is expected and not worth raising for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the code to not raise an error in case the weak reference is invalid.
The code previous to this change was working when self._node
was None
, so I don't think that an error shold be raised in that case.
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with passing CI.
Let's make sure to include the |
The hangs observed in CI might be related with CI up to rclpy, only fastrtps: |
See #470 (comment).