Feature and ifdef FEATURE_MULTITHREADING#124959
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the threading feature detection mechanism in the .NET runtime by consolidating multiple threading-related feature flags into a single, consistently-named flag: FEATURE_IS_MULTITHREADING_SUPPORTED. This replaces the previous FEATURE_WASM_MANAGED_THREADS and FEATURE_SINGLE_THREADED flags with clearer, more consistent naming.
Changes:
- Renamed MSBuild property
FeatureWasmManagedThreadstoFeatureIsMultithreadingSupportedacross all project files - Renamed C# preprocessor define
FEATURE_WASM_MANAGED_THREADStoFEATURE_IS_MULTITHREADING_SUPPORTED - Removed
FEATURE_SINGLE_THREADEDandFeatureSingleThreadin favor of checking!FEATURE_IS_MULTITHREADING_SUPPORTED - Updated documentation in
threads.mdto reflect the new naming - Updated C/C++ PAL layer code to use
FEATURE_IS_MULTITHREADING_SUPPORTED(with appropriate#ifdef/#ifndefusage)
Reviewed changes
Copilot reviewed 68 out of 68 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/mono/wasm/threads.md | Updated documentation to reference new feature flag name |
| src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj | Consolidated feature properties, removed separate single-thread property |
| src/mono/System.Private.CoreLib/src/System/Threading/Monitor.Mono.cs | Updated preprocessor directive |
| src/libraries/System.Threading/src/System.Threading.csproj | Updated feature property definition and condition logic |
| src/libraries/System.Threading/src/System/Threading/*.cs | Updated preprocessor directives in source files |
| src/libraries/System.Threading/ref/System.Threading.cs | Updated preprocessor directives in reference assembly |
| src/libraries/System.Threading.Thread*/ref/*.csproj | Updated feature property references in WebAssembly threading projects |
| src/libraries/System.Threading.ThreadPool*/ref/*.csproj | Updated feature property references |
| src/libraries/System.Threading.Tasks.Parallel/src/*.csproj | Removed separate single-thread flag, using unified flag |
| src/libraries/System.Runtime.InteropServices.JavaScript/src/*.cs | Updated all preprocessor directives across JavaScript interop |
| src/libraries/System.Runtime.InteropServices.JavaScript/src/*.csproj | Updated feature property and conditions |
| src/libraries/System.Runtime.InteropServices.JavaScript/tests/*.cs | Updated test code preprocessor directives |
| src/libraries/System.Private.CoreLib/src/System/Threading/*.cs | Updated threading implementation files |
| src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs | Refactored conditional compilation blocks |
| src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems | Updated file inclusion conditions |
| src/libraries/System.Private.CoreLib/ref/*.cs | Updated reference assembly definitions |
| src/libraries/System.Net.WebSockets.Client/src/*.cs | Updated WebSocket implementation |
| src/libraries/System.Net.Http/src/System.Net.Http.csproj | Removed unused feature property |
| src/libraries/System.Linq.Parallel/src/*.cs | Updated PLINQ implementation files |
| src/libraries/System.Linq.Parallel/src/System.Linq.Parallel.csproj | Consolidated feature flags |
| src/libraries/Common/src/Interop/Browser/Interop.Runtime.Mono.cs | Updated interop declarations |
| src/coreclr/pal/src/thread/*.cpp | Updated PAL thread implementation with inverted conditional logic |
| src/coreclr/pal/src/synchmgr/*.cpp | Updated synchronization manager implementation |
| src/coreclr/pal/src/CMakeLists.txt | Updated CMake definitions |
| src/coreclr/clrdefinitions.cmake | Updated CMake feature definitions |
| src/coreclr/clr.featuredefines.props | Consolidated feature properties |
| eng/native.wasm.targets | Updated native build conditions and CMake arguments |
src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
Outdated
Show resolved
Hide resolved
|
We do not have any I think it should be |
4ecec3d to
91b8eb2
Compare
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Threading/Monitor.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading/src/System/Threading/CountdownEvent.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.Tasks.Parallel/src/System.Threading.Tasks.Parallel.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ExtraApis.cs
Outdated
Show resolved
Hide resolved
...System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.cs
Show resolved
Hide resolved
58c66fa to
97013a8
Compare
...System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj
Outdated
Show resolved
Hide resolved
…ockets.Client.csproj
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Show resolved
Hide resolved
…b.Shared.projitems Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…b.Shared.projitems Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…b.Shared.projitems Co-authored-by: Jan Kotas <jkotas@microsoft.com>
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
…b.Shared.projitems Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/ba-g unrelated failures |
No description provided.