Skip to content

Conversation

@sloretz
Copy link
Contributor

@sloretz sloretz commented Apr 20, 2020

I looked at three rmw implementations, rmw_fastrtps_shared_cpp, rmw_connect_shared_cpp, and rmw_cyclone_cpp, and it seems like they all assume higher layers destroy entities created from nodes before the node itself is destroyed. This PR documents that rmw implementations may assume this.

This also adds an option for rmw implementations to choose to check that assumption and refuse to destroy the node if not all entities created from it have been destroyed. No rmw implementation does this, but I think it would be nice if one did to make it easier to catch destruction order bugs.

Context: ros2/rcl#585
Another PR in rcl documenting that the destruction order responsibility belongs to the client libraries: ros2/rcl#625

@sloretz
Copy link
Contributor Author

sloretz commented Apr 21, 2020

CI (test just rmw)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@sloretz sloretz merged commit f238674 into master Apr 21, 2020
@delete-merged-branch delete-merged-branch bot deleted the sloretz/document_rmw_destroy_node_will_come_last branch April 21, 2020 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants