There is a mutable map linking goals to health kit data sources. While all writes to
this were protected by a mutex, reads were not. It appears it is not safe to read from
this connection while writing to it, so this lead to crashes. Fix by also wrapping the
read.
Testing:
Launched the app and checked it could sync goals
There is a mutable map linking goals to health kit data sources. While all writes to this were protected by a mutex, reads were not. It appears it is not safe to read from this connection while writing to it, so this lead to crashes. Fix by also wrapping the read.
Testing: Launched the app and checked it could sync goals