Skip to content

Lock around access to s_dynamicSymbols#52887

Merged
baronfel merged 3 commits intodotnet:release/10.0.3xxfrom
tmat:DynamicCommandsLock
Feb 6, 2026
Merged

Lock around access to s_dynamicSymbols#52887
baronfel merged 3 commits intodotnet:release/10.0.3xxfrom
tmat:DynamicCommandsLock

Conversation

@tmat
Copy link
Member

@tmat tmat commented Feb 6, 2026

Alternative to #52883

Copilot AI review requested due to automatic review settings February 6, 2026 21:15
@tmat
Copy link
Member Author

tmat commented Feb 6, 2026

@baronfel Alternative fix

Copy link
Contributor

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 addresses thread-safety around the dynamic-completions metadata stored in DynamicSymbolExtensions by synchronizing access to the shared s_dynamicSymbols dictionary.

Changes:

  • Add a static lock to guard reads/writes to s_dynamicSymbols.
  • Consolidate the extension receiver to Symbol (instead of separate Option/Argument extension blocks), keeping IsDynamic functionality in one place.

@baronfel
Copy link
Member

baronfel commented Feb 6, 2026

Thanks, this is more like what I was thinking based on how the other extensibility points solved concurrency.

@baronfel baronfel merged commit 1eac263 into dotnet:release/10.0.3xx Feb 6, 2026
24 of 26 checks passed
@tmat tmat deleted the DynamicCommandsLock branch February 7, 2026 01:53
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