Skip to content

Conversation

mauroa
Copy link
Contributor

@mauroa mauroa commented Jun 11, 2025

With another recent PerfWatson fix (824fc62), a lock has been introduced in the disconnected_check method, to mostly control the access of the disconnected property. This caused a new PerfWatson issue, so this change reverts that extra threading control and instead converts the disconnected boolean variable into a volatile variable, so the latest updated value is always guaranteed for multi threading access, without the need of an unnecessary and blocking lock.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2481686/?view=edit

…_check

With another recent PerfWatson fix (mono@824fc62), a lock has been introduced in the disconnected_check method, to mostly control the access of the disconnected property.
This caused a new PerfWatson issue, so this change reverts that extra threading control and instead converts the disconnected boolean variable into a volatile variable, so the latest updated value is always guaranteed for multi threading access, without the need of an unnecessary and blocking lock.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2481686/?view=edit
@thaystg thaystg merged commit f257277 into mono:main Jun 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants