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

Shutdown explicitly while existing #623

Open
wants to merge 2 commits into
base: ros2
Choose a base branch
from

Conversation

evshary
Copy link

@evshary evshary commented Oct 18, 2024

🦟 Bug fix

Summary

Shutdown explicitly after creating an entity.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Copy link
Contributor

@caguero caguero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, do we need to call shutdown() before the previous return calls as well?

@evshary
Copy link
Author

evshary commented Oct 25, 2024

Just checking, do we need to call shutdown() before the previous return calls as well?

Good catch! I believe it should be.

Copy link
Contributor

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of multiple rclcpp::shutdown() calls, we could wrap this call inside a callback that will automatically execute once the program terminates by relying on rcpputils::make_scope_exit().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

3 participants