Skip to content

Remove SyntaxTokenCache.Entry#12370

Merged
ToddGrun merged 1 commit intodotnet:mainfrom
ToddGrun:dev/toddgrun/CleanupSyntaxCache
Oct 21, 2025
Merged

Remove SyntaxTokenCache.Entry#12370
ToddGrun merged 1 commit intodotnet:mainfrom
ToddGrun:dev/toddgrun/CleanupSyntaxCache

Conversation

@ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented Oct 20, 2025

While debugging some related code, I noticed this class didn't use a lock when getting the Entry, which smelled to me like a possible torn read/write issue (and those suck).

I mentioned this to Dustin to make sure I wasn't being goofy, and he thought that might be a concern here too, but then raised the valid point that the reason for it being a struct (to have a hash in addition to the SyntaxToken) wasn't even necessary.

While debugging some related code, I noticed this class didn't use a lock when getting the Entry, which smelled to me like a possible torn read/writes issue (and those suck). I mentioned this to Dustin to make sure I wasn't being goofy, and he thought that might be a concern here too, but then raised the valid point that the reason for it being a struct (to have a hash in addition to the SyntaxToken) wasn't even necessary.
@ToddGrun ToddGrun requested a review from a team as a code owner October 20, 2025 21:30
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.

3 participants