Skip to content

feat: add mutex for locking subscriber map #11

Open
@t-bre

Description

@t-bre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestpriorityHigh priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions