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

feat: add mutex for locking subscriber map #11

Open
3 tasks
t-bre opened this issue Feb 10, 2023 · 0 comments
Open
3 tasks

feat: add mutex for locking subscriber map #11

t-bre opened this issue Feb 10, 2023 · 0 comments
Labels
feature New feature or request
Milestone

Comments

@t-bre
Copy link
Member

t-bre commented Feb 10, 2023

Description

When users call rtcan_subscribe, the subscriber hashmap is modified. If this happens while the RTCAN receive thread is running, it may not be thread safe.

Requirements

  • Add a new mutex to RTCAN instances.
  • Lock the mutex when rtcan_subscribe is modifying the subscriber hashmap.
  • Lock the mutex when the RTCAN receive thread is reading the subscriber hashmap.
@t-bre t-bre added the feature New feature or request label Feb 10, 2023
@t-bre t-bre added this to the STAG 9 milestone Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant