File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
tracer/src/Datadog.Trace/Configuration Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ internal class SettingsManager(
4040
4141 /// <summary>
4242 /// Subscribe to changes in <see cref="MutableSettings"/> and/or <see cref="ExporterSettings"/>.
43- /// Called whenever these settings change. If the settings have already changed when <see cref="SubscribeToChanges"/>
44- /// is called, <paramref name="callback"/> is invoked immediately with the latest configuration.
43+ /// <paramref name="callback"/> is called whenever these settings change. If the settings have already changed when <see cref="SubscribeToChanges"/>
44+ /// is called, <paramref name="callback"/> is synchronously invoked immediately with the latest configuration.
4545 /// Also note that calling <see cref="SubscribeToChanges"/> twice with the same callback
46- /// will invoke the callback twice.
46+ /// will invoke the callback twice. Callbacks should complete quickly to avoid blocking other operations.
4747 /// </summary>
4848 /// <param name="callback">The method to invoke</param>
4949 /// <returns>An <see cref="IDisposable"/> that should be disposed to unsubscribe</returns>
@@ -160,10 +160,9 @@ private void NotifySubscribers(SettingChanges settings)
160160
161161 lock ( _subscribers )
162162 {
163- var subscribers = _subscribers ;
164163 Volatile . Write ( ref _latest , settings ) ;
165164
166- foreach ( var subscriber in subscribers )
165+ foreach ( var subscriber in _subscribers )
167166 {
168167 try
169168 {
You can’t perform that action at this time.
0 commit comments