Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2544,10 +2544,10 @@ internal void UnsafeSetContinuationForAwait(IAsyncStateMachineBox stateMachineBo

// This code path doesn't emit all expected TPL-related events, such as for continuations.
// It's expected that all callers check whether events are enabled before calling this function,
// and only call it if they're not, so we assert. However, as events can be dynamically turned
// on and off, it's possible this assert could fire even when used correctly. If it becomes
// noisy, it can be deleted.
Debug.Assert(!TplEventSource.Log.IsEnabled());
// and only call it if they're not. However, as events can be dynamically turned
// on and off, it's possible this assert could fire even when used correctly. Do not call this
// method unless you've checked that TplEventSource.Log.IsEnabled() is false (if it becomes true after
// the check, that's fine, and a natural race condition that's unavoidable).

// If the caller wants to continue on the current context/scheduler and there is one,
// fall back to using the state machine's delegate.
Expand Down