File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2544,10 +2544,10 @@ internal void UnsafeSetContinuationForAwait(IAsyncStateMachineBox stateMachineBo
25442544
25452545 // This code path doesn't emit all expected TPL-related events, such as for continuations.
25462546 // It's expected that all callers check whether events are enabled before calling this function,
2547- // and only call it if they're not, so we assert . However, as events can be dynamically turned
2548- // on and off, it's possible this assert could fire even when used correctly. If it becomes
2549- // noisy, it can be deleted.
2550- Debug . Assert ( ! TplEventSource . Log . IsEnabled ( ) ) ;
2547+ // and only call it if they're not. However, as events can be dynamically turned
2548+ // on and off, it's possible this assert could fire even when used correctly. Do not call this
2549+ // method unless you've checked that TplEventSource.Log.IsEnabled() is false (if it becomes true after
2550+ // the check, that's fine, and a natural race condition that's unavoidable).
25512551
25522552 // If the caller wants to continue on the current context/scheduler and there is one,
25532553 // fall back to using the state machine's delegate.
You can’t perform that action at this time.
0 commit comments