You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no safe way to unsubscribe from a topic. If the user calls dispose() on a Subscription, then it will destroy the native subscription (effectively unsubscribing), but the Node is not aware of the subscriptions disposal. E.g. getSubscriptions will return disposed subscriptions that may be accessed by executors leading an exception:
org.ros2.rcljava.exceptions.RCLException: Failed to add subscription to wait set
I think we need a way to safely remove Subscription (and Publisher) objects from a node. Whether that is through the existing Disposable interface or API added to the node (e.g. removeSubscription).
Implementation considerations
I think having the node detect when a subscription has been disposed (perhaps using WeakReference) would be nice as I don't think it would require additional API.
Activity
Add methods to remove entities from Node
Add methods to remove entities from Node
Add methods to remove entities from Node
Add methods to remove entities from Node (#110)
jacobperron commentedon Jul 29, 2020
This was fixed in #110
esteve commentedon Jul 29, 2020
@jacobperron thanks for catching that!
Add methods to remove entities from Node (#110)
Add methods to remove entities from Node (#110)