hc icon indicating copy to clipboard operation
hc copied to clipboard

address data races

Open marzocchi opened this issue 3 years ago • 0 comments

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:

  • calling SetValue or GetValue inside OnValueRemoteUpdate now locks forever (but i'm not sure if it actually makes sense to do so in the first place)
  • it's still possible to cause a data race by reading and writing to the Value field directly

marzocchi avatar Mar 31 '21 07:03 marzocchi