Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clean up stale debugger-related surface area in ThreadPool and Task{Scheduler} #115210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2025

Conversation

eduardo-vp
Copy link
Member

@eduardo-vp eduardo-vp commented May 1, 2025

After checking with the VS debugger team, seems like it should be safe to remove these properties, other fields/properties/methods seem to still be in use.

Fixes #62653.

@Copilot Copilot AI review requested due to automatic review settings May 1, 2025 00:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR cleans up obsolete debugger-related properties that are no longer used by the VS debugger team. The changes remove the AllTimers property from Timer.cs, the RequiresAtomicStartTransition property from ThreadPoolTaskScheduler.cs, and two debugger-only properties (StateFlagsForDebugger and StateFlags) from Task.cs.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
Timer.cs Removed the AllTimers property used solely for debugger inspection.
ThreadPoolTaskScheduler.cs Removed the RequiresAtomicStartTransition property no longer needed.
Task.cs Removed debugger-only properties StateFlagsForDebugger and StateFlags.
Files not reviewed (1)
  • src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.Shared.xml: Language not supported

@@ -973,23 +973,5 @@ public ValueTask DisposeAsync()
}

private string DisplayString => _timer._timer.DisplayString;

/// <summary>Gets a list of all timers for debugging purposes.</summary>
private static IEnumerable<TimerQueueTimer> AllTimers // intended to be used by devs from debugger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If memory serves (and the comment confirms), this wasn't used by the debugger itself but rather intended to be used by a developer in the debugger, e.g. in a watch window. It was added in #49100.

That said, I've not used this in years, I suspect few others have either, it's not documented, etc. I'd be fine removing it.

@eduardo-vp
Copy link
Member Author

/ba-g unrelated error

@eduardo-vp eduardo-vp merged commit de2992d into dotnet:main May 6, 2025
137 of 141 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up stale debugger-related surface area in ThreadPool and Task{Scheduler}
2 participants