Skip to content

Adopt RuntimeFeature.IsMultithreadingSupported for CoreCLR PlatformDetection#127313

Merged
pavelsavara merged 1 commit intodotnet:mainfrom
pavelsavara:pavelsavara/adopt-ismultithreadingsupported
Apr 23, 2026
Merged

Adopt RuntimeFeature.IsMultithreadingSupported for CoreCLR PlatformDetection#127313
pavelsavara merged 1 commit intodotnet:mainfrom
pavelsavara:pavelsavara/adopt-ismultithreadingsupported

Conversation

@pavelsavara
Copy link
Copy Markdown
Member

@pavelsavara pavelsavara commented Apr 23, 2026

Replace the reflection-based workaround in src/tests/Common/CoreCLRTestLibrary/PlatformDetection.cs with a direct RuntimeFeature.IsMultithreadingSupported call, now that the ref assemblies (SDK 11.0.100-preview.3) include the API.

  • Removed GetIsMultithreadingSupported() reflection helper
  • Removed unused using System.Reflection
  • Removed TODO comment

Fixes #124748

…tection

Replace reflection-based workaround with direct RuntimeFeature.IsMultithreadingSupported call now that the ref assemblies include the API.

Fixes dotnet#124748
Copilot AI review requested due to automatic review settings April 23, 2026 08:23
@pavelsavara pavelsavara self-assigned this Apr 23, 2026
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Apr 23, 2026
@pavelsavara pavelsavara added this to the 11.0.0 milestone Apr 23, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
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

Updates CoreCLR test PlatformDetection to use the now-available RuntimeFeature.IsMultithreadingSupported API directly, removing the previous reflection-based workaround used for WASM multithreading detection.

Changes:

  • Replace the reflection helper with RuntimeFeature.IsMultithreadingSupported.
  • Remove the unused System.Reflection using and the related TODO/comment block.

@pavelsavara pavelsavara merged commit c4f4608 into dotnet:main Apr 23, 2026
99 checks passed
@pavelsavara pavelsavara deleted the pavelsavara/adopt-ismultithreadingsupported branch April 23, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-System.Reflection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt RuntimeFeature.IsMultithreadingSupported for PlatformDetection

3 participants