brutella / hc

hc is a lightweight framework to develop HomeKit accessories in Go.
Apache License 2.0
1.74k stars 189 forks source link

address data races #197

Closed marzocchi closed 1 year ago

marzocchi commented 3 years ago

there are some data races that can be spotted by running _example/example with -race, especially after changing the sleep interval to <1s.

to note: the data race in Characteristic's updateValue/getValue probably needs a better solution, maybe some refactoring, than just using locks: