Avoid a reference cycle between Node and TimeSource#488
Conversation
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
| 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.
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.
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 <ivanpauno@ekumenlabs.com>
|
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).