Repository navigation
Conversation
Keep TLS trimming and Gen2 GC callbacks while omitting the ConditionalWeakTable registry when FEATURE_MULTITHREADING is disabled. Co-authored-by: Copilot <[email protected]> Copilot-Session: a12afcbf-930f-4101-b0ed-bd4a35548d7e
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-buffers |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new branch lacks regression coverage on single-threaded browser/WASI builds because existing tests require RemoteExecutor; an in-process test must verify eventual TLS eviction with logging both disabled and enabled.
1 open issue
What changed in this PR
This PR removes cross-thread tracking from SharedArrayPool<T> in single-threaded builds while retaining thread-local buffer trimming and Gen2 GC callbacks.
Changes:
- Guard the
ConditionalWeakTableregistry and registration withFEATURE_MULTITHREADING. - Trim thread-local buckets directly when multithreading is disabled, preserving logging behavior.
- Keep GC callback registration unchanged.
| File | Description |
|---|---|
src/libraries/System.Private.CoreLib/src/System/Buffers/SharedArrayPool.cs |
Conditionally omit cross-thread tracking and trim local buckets directly in single-threaded builds. |
Review effort: Balanced
3 tasks
pavelsavara
approved these changes
Nov 13, 2026
Member
|
/ba-g known failure #137525 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Keep TLS trimming and Gen2 GC callbacks while omitting the ConditionalWeakTable registry when FEATURE_MULTITHREADING is disabled.