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

fix(ad_service_state_monitor): lock shread variables #1392

Closed
wants to merge 1 commit into from
Closed

Conversation

ytakano
Copy link
Contributor

@ytakano ytakano commented Jul 21, 2022

state_machine_ and state_input_ are shared by multiple callback groups (threads).
So, mutex locks have been applied because it may cause race conditions.

Signed-off-by: Yuuki Takano yuuki.takano@tier4.jp

Description

AutowareStateMonitorNode::state_machine_ and AutowareStateMonitorNode::state_input_ are accessed by multiple threads without mutex locks. This may cause race conditions.
So, mutex locks have been applied to the shared variables.

Pre-review checklist for the PR author

In-review checklist for the PR reviewers

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

…conditions

state_machine_ and state_input_ are shared by multiple callback groups (threads).
So, mutex locks have been applied because it may cause race conditions.

Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
@ytakano ytakano closed this Jul 21, 2022
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.

1 participant