openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

micd: fix thread safety by adding locking for shared state

Open deanlee opened this issue 5 months ago • 0 comments

Fixes multiple threading issues in micd by adding a lock to protect shared state accessed by both the audio callback and the main update loop.

All reads and writes to shared variables are now guarded by this lock, this prevents race conditions and ensures consistent, correct operation when the callback and update methods are called from different threads.

deanlee avatar May 07 '25 21:05 deanlee