[Breaking change]: 6.0 servicing change to EventSource callback behavior #35313
Labels
breaking-change
Indicates a .NET Core breaking change
doc-idea
Indicates issues that are suggestions for new topics [org][type][category]
Pri1
High priority, do before Pri2 and Pri3
📌 seQUESTered
Identifies that an issue has been imported into Quest.
Description
PR #84680 includes a breaking change in the June 6.0 servicing release
Version
Other (please put exact version in description textbox)
Previous behavior
Prior to this change, we would issue the
EventSource.OnEventCommand
callback for aEventCommand.Disable
prior to settingm_eventSourceEnabled=false
. This means thatIsEnabled
would return true in theOnEventCommand
callback for a userEventSource
, even if the command would lead to theEventSource
being disabled.The callback happens after we turn off the ability to dispatch events though, so even if an
EventSource
tries to fire an event it will not be written. Also, forEventCommand.Enable
we issue a consistent view -IsEnabled
accurately reports the state of the world, and theEventSource
can write events from theOnEventCommand
callback. This change makes theEventCommand.Disable
behavior match theEnable
behavior.New behavior
The change makes the callbacks consistent, now we will mark the
EventSource
as disabled before the callback.Type of breaking change
Reason for change
This change was necessary to support multiple EventCounters instances, which has been requested as a blocker by multiple internal and external customers
Recommended action
I can't think of a scenario where the old behavior is desired, there is no way to revert to it.
Feature area
Core .NET libraries
Affected APIs
No response
Associated WorkItem - 97022
The text was updated successfully, but these errors were encountered: