Skip to content
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

Document rmw_destroy_node may assume correct destruction order #216

Merged
merged 1 commit into from
Apr 21, 2020

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

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
@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.

2 participants