esp-nimble-cpp icon indicating copy to clipboard operation
esp-nimble-cpp copied to clipboard

Guidance for thread safety

Open chmorgan opened this issue 3 months ago • 3 comments

I assume I should know this, question is whether calling BLECharacteristic setters and getters from threads other than the one they were created in is safe.

Can’t find any guidance on nimble thread safety (so I assume it isn’t) and didn’t see any guidance here either. I can update the readme if some guidance notes are provided here @h2zero

chmorgan avatar Sep 07 '25 17:09 chmorgan

All value functions are thread safe, getters make a copy inside a critical section and values are changed inside critical sections.

h2zero avatar Sep 07 '25 17:09 h2zero

Will close if #367 or something like it lands (or if its rejected as not necessary).

chmorgan avatar Sep 28 '25 14:09 chmorgan

Commented on PR, thanks!

h2zero avatar Sep 28 '25 23:09 h2zero