HealthStoreManager maintains a global cache of connections. This leads to race conditions when multiple threads simultaneously try to create a connection for the same metric. We could solve this with actors, but do not want to in this case as the silentlyInstallObservers method should be synchronous. Instead we use a sempahore to protect access to the dictionary.
HealthStoreManager maintains a global cache of connections. This leads to race conditions when multiple threads simultaneously try to create a connection for the same metric. We could solve this with actors, but do not want to in this case as the
silentlyInstallObservers
method should be synchronous. Instead we use a sempahore to protect access to the dictionary.