forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ad_service_state_monitor): lock shread variables to prevent race … (
#1395) * fix(ad_service_state_monitor): lock shread variables to prevent race condition 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> * fix(ad_service_state_monitor): lock state_input_ state_input_ must be locked before accessing Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp> * fix(ad_service_state_monitor): minimamize the steps of the critical sections - Unlock the locks as earlier as possible. - rename lock variables to improve readability Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp> * fix(ad_service_state_monitor_node): remove uneccesary unlock Signed-off-by: Yuuki Takano <yuuki.takano@tier4.jp>
- Loading branch information
Showing
3 changed files
with
82 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters