esp32-ble2mqtt
esp32-ble2mqtt copied to clipboard
operation_queue concurrent access
After looking at the code, it appears (to me?) that operation_queue is being accessed concurrently by two tasks, should this access be protected by some sort of access mechanism (i.e. semaphore)?
Hey,
You're probably right. I've recently added one for the devices_list
so one might be in order here as well.
Another option is to use FreeRTOS's queue implementation (not sure why I didn't use it in the first place) which is probably* thread safe.
*I'd still verify that
Thanks!
I have a few other bugs/suggestions for your code, are you interested in hearing them? If so, should I post them to public forum, or this private email?
On Mon, Apr 26, 2021 at 1:08 AM Assaf Inbal @.***> wrote:
Hey,
You're probably right. I've recently added one for the devices_list so one might be in order here as well. Another option is to use FreeRTOS's queue implementation (not sure why I didn't use it in the first place) which is probably* thread safe.
*I'd still verify that
Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shmuelzon/esp32-ble2mqtt/issues/104#issuecomment-826609919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIRDRSMFEGPVO72LVUZY73TKUNO7ANCNFSM43SIKQCQ .
are you interested in hearing them?
Of course I am! Anything you think might help this project. Publicly is fine, there aren't any secrets in the code. But, if it's not too much trouble, I would appreciate a separate issue for each so it would be easier to manage and fix one at a time.