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

Call init and shutdown thread safely #508

Merged
merged 3 commits into from
Feb 14, 2020

Conversation

ivanpauno
Copy link
Member

The rcl functions aren't thread safe.
The upper layer has to lock.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno added bug Something isn't working in review Waiting for review (Kanban column) labels Feb 12, 2020
@ivanpauno ivanpauno self-assigned this Feb 12, 2020
Copy link
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

Out of curiosity, did this show up as errors somewhere?

Also, consider adding this to the Dashing and Eloquent patch release project boards for backport.

rclpy/rclpy/__init__.py Outdated Show resolved Hide resolved
@ivanpauno
Copy link
Member Author

Out of curiosity, did this show up as errors somewhere?

No, I realized about the problem in another discussion.
It's pretty hard to hit the problem, as shutdown should be called asynchronously while init is still running, which is an strange use-case.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Member Author

  • Linux Build Status

@ivanpauno ivanpauno merged commit 6d009fb into master Feb 14, 2020
@delete-merged-branch delete-merged-branch bot deleted the ivanpauno/call-init-and-shutdown-thread-safely branch February 14, 2020 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants