Skip to content

Commit 765090f

Browse files
authored
[browser][mt] Unify multithreading switches (#97560)
* Unification * Typo: remove quotation. * Simplify more using the fact that `RIDForWorkload` cannot be empty. * Quotation typo * Feedback * Replace `MonoWasmThreads` with `WasmEnableThreads`
1 parent 541857c commit 765090f

File tree

115 files changed

+435
-447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+435
-447
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
- browser_wasm
125125
#- browser_wasm_win
126126
nameSuffix: _Threading
127-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
127+
extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
128128
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
129129
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
130130
# Always run for runtime-wasm because tests are not run in runtime
@@ -255,7 +255,7 @@ jobs:
255255
- browser_wasm
256256
- browser_wasm_win
257257
nameSuffix: MultiThreaded
258-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
258+
extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
259259
condition: ne(variables['wasmMultiThreadedBuildOnlyNeededOnDefaultPipeline'], true)
260260
publishArtifactsForWorkload: true
261261
publishWBT: false
@@ -313,7 +313,7 @@ jobs:
313313
platforms:
314314
- Browser_wasm
315315
- Browser_wasm_win
316-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
316+
extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
317317
nameSuffix: DebuggerTests_MultiThreaded
318318
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
319319
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}

eng/pipelines/runtime-official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ extends:
394394
platforms:
395395
- browser_wasm
396396
jobParameters:
397-
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoWasmBuildVariant=multithread /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
397+
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
398398
nameSuffix: Mono_multithread
399399
isOfficialBuild: ${{ variables.isOfficialBuild }}
400400
runtimeVariant: multithread

eng/pipelines/runtime.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ extends:
565565
- browser_wasm_win
566566
condition: or(eq(variables.isRollingBuild, true), eq(variables.wasmSingleThreadedBuildOnlyNeededOnDefaultPipeline, true))
567567
nameSuffix: MultiThreaded
568-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
568+
extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
569569
publishArtifactsForWorkload: true
570570
publishWBT: false
571571

@@ -601,7 +601,7 @@ extends:
601601
platforms:
602602
- browser_wasm
603603
nameSuffix: _Threading_Smoke
604-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
604+
extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
605605
shouldRunSmokeOnly: true
606606
alwaysRun: ${{ variables.isRollingBuild }}
607607
scenarios:

eng/testing/tests.browser.targets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@
8787
<_AppArgs Condition="'$(IsFunctionalTest)' != 'true' and '$(WasmMainAssemblyFileName)' != ''">--run $(WasmMainAssemblyFileName)</_AppArgs>
8888
<_AppArgs Condition="'$(IsFunctionalTest)' == 'true'">--run $(AssemblyName).dll</_AppArgs>
8989

90-
<_XUnitBackgroundExec Condition="'$(_XUnitBackgroundExec)' == '' and '$(MonoWasmBuildVariant)' == 'multithread'">true</_XUnitBackgroundExec>
90+
<_XUnitBackgroundExec Condition="'$(_XUnitBackgroundExec)' == '' and '$(WasmEnableThreads)' == 'true'">true</_XUnitBackgroundExec>
9191
<WasmTestAppArgs Condition="'$(_XUnitBackgroundExec)' == 'true'">$(WasmTestAppArgs) -backgroundExec</WasmTestAppArgs>
9292
<_AppArgs Condition="'$(WasmTestAppArgs)' != ''">$(_AppArgs) $(WasmTestAppArgs)</_AppArgs>
9393

9494
<WasmXHarnessMonoArgs Condition="'$(XunitShowProgress)' == 'true'">$(WasmXHarnessMonoArgs) --setenv=XHARNESS_LOG_TEST_START=1</WasmXHarnessMonoArgs>
9595
<!-- snapshots are not yet supported with threads -->
96-
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --no-memory-snapshot</WasmXHarnessMonoArgs>
96+
<WasmXHarnessMonoArgs Condition="'$(WasmEnableThreads)' == 'true'">$(WasmXHarnessMonoArgs) --no-memory-snapshot</WasmXHarnessMonoArgs>
9797
<!-- help unit test with PlatformDetection.IsThreadingSupported via IsBrowserThreadingSupported env variable -->
98-
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --setenv=IsBrowserThreadingSupported=true</WasmXHarnessMonoArgs>
98+
<WasmXHarnessMonoArgs Condition="'$(WasmEnableThreads)' == 'true'">$(WasmXHarnessMonoArgs) --setenv=IsBrowserThreadingSupported=true</WasmXHarnessMonoArgs>
9999
</PropertyGroup>
100100

101101
<PropertyGroup Condition="'$(RunScriptCommand)' == ''">
@@ -104,7 +104,7 @@
104104

105105
<_XHarnessArgs Condition="'$(IsFunctionalTest)' == 'true'" >$(_XHarnessArgs) --expected-exit-code=$(ExpectedExitCode)</_XHarnessArgs>
106106
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgs)</_XHarnessArgs>
107-
<_XHarnessArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread' and '$(_XHarnessArs.Contains(&quot;--web-server-use-cop&quot;)' != 'true'">$(_XHarnessArgs) --web-server-use-cop</_XHarnessArgs>
107+
<_XHarnessArgs Condition="'$(WasmEnableThreads)' == 'true' and '$(_XHarnessArs.Contains(&quot;--web-server-use-cop&quot;)' != 'true'">$(_XHarnessArgs) --web-server-use-cop</_XHarnessArgs>
108108
<_XHarnessArgs >$(_XHarnessArgs) -s dotnet.native.js.symbols</_XHarnessArgs>
109109
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbol-patterns wasm-symbol-patterns.txt</_XHarnessArgs>
110110
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbolicator WasmSymbolicator.dll,Microsoft.WebAssembly.Internal.SymbolicatorWrapperForXHarness</_XHarnessArgs>

eng/testing/workloads-browser.targets

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@
4747
<Target Name="_GetRuntimePackNuGetsToBuild" Condition="'$(WasmSkipMissingRuntimePackBuild)' != 'true'" Returns="@(_NuGetsToBuild)">
4848
<Error Condition="'$(RIDForWorkload)' == ''" Text="$(RIDForWorkload) is unset" />
4949
<PropertyGroup>
50-
<_DefaultBuildVariant Condition="'$(MonoWasmBuildVariant)' == 'multithread'">.multithread.</_DefaultBuildVariant>
51-
<_DefaultBuildVariant Condition="'$(_DefaultBuildVariant)' == ''">.</_DefaultBuildVariant>
52-
53-
<_DefaultRuntimePackNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono$(_DefaultBuildVariant)$(RIDForWorkload).$(PackageVersionForWorkloadManifests).nupkg</_DefaultRuntimePackNuGetPath>
50+
<_BuildVariant Condition="'$(WasmEnableThreads)' == 'true'">multithread</_BuildVariant>
51+
<_Descriptor Condition="'$(WasmEnableThreads)' == 'true'">runtime pack for $(_BuildVariant)</_Descriptor>
52+
<_Descriptor Condition="'$(WasmEnableThreads)' != 'true'">single threaded runtime pack</_Descriptor>
53+
<_DefaultRuntimePackNuGetPath>$([System.String]::Join('.',
54+
$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono,
55+
$(_BuildVariant),
56+
$(RIDForWorkload).$(PackageVersionForWorkloadManifests).nupkg))
57+
</_DefaultRuntimePackNuGetPath>
5458
</PropertyGroup>
5559

5660
<ItemGroup>
@@ -63,22 +67,11 @@
6367
Text="Expected to find either one or two in $(LibrariesShippingPackagesDir): @(_RuntimePackNugetAvailable->'%(FileName)%(Extension)')" />
6468

6569
<ItemGroup>
66-
<_BuildVariants Include="multithread" Condition="'$(_DefaultBuildVariant)' != '.multithread.'" />
67-
68-
<_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.%(_BuildVariants.Identity).$(RIDForWorkload).$(PackageVersionForWorkloadManifests).nupkg"
69-
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj"
70-
Dependencies="$(_DefaultRuntimePackNuGetPath)"
71-
Properties="@(_DefaultPropsForNuGetBuild, ';');MonoWasmBuildVariant=%(_BuildVariants.Identity)"
72-
Descriptor="runtime pack for %(_BuildVariants.Identity)"
73-
Condition="'%(_BuildVariants.Identity)' != ''"/>
74-
75-
<!-- add for non-threaded runtime also -->
76-
<_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.$(RIDForWorkload).$(PackageVersionForWorkloadManifests).nupkg"
70+
<_NuGetsToBuild Include="$(_DefaultRuntimePackNuGetPath)"
7771
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj"
78-
Properties="@(_DefaultPropsForNuGetBuild, ';');MonoWasmBuildVariant="
7972
Dependencies="$(_DefaultRuntimePackNuGetPath)"
80-
Descriptor="single threaded runtime pack"
81-
Condition="'$(_DefaultBuildVariant)' != '.'" />
73+
Properties="@(_DefaultPropsForNuGetBuild, ';');WasmEnableThreads=$(WasmEnableThreads)"
74+
Descriptor="$(_Descriptor)"/>
8275
</ItemGroup>
8376

8477
<Message

src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<PropertyGroup Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(RuntimeFlavor)' == 'Mono' and '$(TargetsMobile)' != 'true'">
3333
<RuntimeSpecificFrameworkSuffix>Mono.LLVM.AOT</RuntimeSpecificFrameworkSuffix>
3434
</PropertyGroup>
35-
<PropertyGroup Condition="'$(MonoWasmBuildVariant)' != ''">
36-
<RuntimeSpecificFrameworkSuffix>Mono.$(MonoWasmBuildVariant)</RuntimeSpecificFrameworkSuffix>
35+
<PropertyGroup Condition="'$(WasmEnableThreads)' == 'true'">
36+
<RuntimeSpecificFrameworkSuffix>Mono.multithread</RuntimeSpecificFrameworkSuffix>
3737
</PropertyGroup>
3838
<PropertyGroup Condition="'$(RuntimeSpecificFrameworkSuffix)' != ''">
3939
<OverridePackageId>$(SharedFrameworkName).Runtime.$(RuntimeSpecificFrameworkSuffix).$(RuntimeIdentifier)</OverridePackageId>

src/libraries/Common/src/Interop/Browser/Interop.Runtime.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal static unsafe partial class Runtime
2727
public static extern void DeregisterGCRoot(nint handle);
2828
#endif
2929

30-
#if FEATURE_WASM_THREADS
30+
#if FEATURE_WASM_MANAGED_THREADS
3131
[MethodImpl(MethodImplOptions.InternalCall)]
3232
public static extern void InstallWebWorkerInterop(nint proxyContextGCHandle);
3333
[MethodImpl(MethodImplOptions.InternalCall)]

src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
77
</PropertyGroup>
88

9-
<PropertyGroup Condition="'$(MonoWasmBuildVariant)' == 'multithread'">
9+
<PropertyGroup Condition="'$(WasmEnableThreads)' == 'true'">
1010
<!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
1111
but this contract still does since we only expose the wasm threading through System.Diagnostics.Tracing.WebAssembly.PerfTracing
1212
so we need to baseline the ApiCompat errors related to that -->

src/libraries/System.Linq.Parallel/src/System.Linq.Parallel.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework Condition="'$(MonoWasmBuildVariant)' != 'multithread'">$(NetCoreAppCurrent)</TargetFramework>
5-
<TargetFrameworks Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser</TargetFrameworks>
4+
<TargetFramework Condition="'$(WasmEnableThreads)' != 'true'">$(NetCoreAppCurrent)</TargetFramework>
5+
<TargetFrameworks Condition="'$(WasmEnableThreads)' == 'true'">$(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser</TargetFrameworks>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
88
</PropertyGroup>
99
<PropertyGroup>
1010
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
11-
<FeatureWasmThreads Condition="'$(TargetPlatformIdentifier)' == 'browser' and '$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmThreads>
12-
<DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
11+
<FeatureWasmManagedThreads Condition="'$(TargetPlatformIdentifier)' == 'browser' and '$(WasmEnableThreads)' == 'true'">true</FeatureWasmManagedThreads>
12+
<DefineConstants Condition="'$(FeatureWasmManagedThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_MANAGED_THREADS</DefineConstants>
1313
</PropertyGroup>
1414
<!-- Compiled Source Files -->
1515
<ItemGroup>
@@ -158,8 +158,8 @@
158158
<Reference Include="System.Diagnostics.Tracing" />
159159
<Reference Include="System.Linq" />
160160
<Reference Include="System.Runtime" />
161-
<Reference Include="System.Threading" Condition="'$(MonoWasmBuildVariant)' != 'multithread'" />
162-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.WebAssembly.Threading\ref\System.Threading.WebAssembly.Threading.csproj" Condition="'$(MonoWasmBuildVariant)' == 'multithread'" />
161+
<Reference Include="System.Threading" Condition="'$(WasmEnableThreads)' != 'true'" />
162+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.WebAssembly.Threading\ref\System.Threading.WebAssembly.Threading.csproj" Condition="'$(WasmEnableThreads)' == 'true'" />
163163
</ItemGroup>
164164

165165
</Project>

src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Channels/AsynchronousChannel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace System.Linq.Parallel
1717
/// This is a bounded channel meant for single-producer/single-consumer scenarios.
1818
/// </summary>
1919
/// <typeparam name="T">Specifies the type of data in the channel.</typeparam>
20-
#if !FEATURE_WASM_THREADS
20+
#if !FEATURE_WASM_MANAGED_THREADS
2121
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
2222
#endif
2323
internal sealed class AsynchronousChannel<T> : IDisposable

src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/AsynchronousChannelMergeEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace System.Linq.Parallel
2626
///
2727
/// </summary>
2828
/// <typeparam name="T"></typeparam>
29-
#if !FEATURE_WASM_THREADS
29+
#if !FEATURE_WASM_MANAGED_THREADS
3030
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
3131
#endif
3232
internal sealed class AsynchronousChannelMergeEnumerator<T> : MergeEnumerator<T>

src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/MergeExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public IEnumerator<TInputOutput> GetEnumerator()
141141
// An array of asynchronous channels, one for each partition.
142142
//
143143

144-
#if !FEATURE_WASM_THREADS
144+
#if !FEATURE_WASM_MANAGED_THREADS
145145
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
146146
#endif
147147
internal static AsynchronousChannel<TInputOutput>[] MakeAsynchronousChannels(int partitionCount, ParallelMergeOptions options, IntValueEvent? consumerEvent, CancellationToken cancellationToken)

src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/OrderPreservingPipeliningMergeHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace System.Linq.Parallel
3636
/// Finally, if the producer notices that its buffer has exceeded an even greater threshold, it will
3737
/// go to sleep and wait until the consumer takes the entire buffer.
3838
/// </summary>
39-
#if !FEATURE_WASM_THREADS
39+
#if !FEATURE_WASM_MANAGED_THREADS
4040
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
4141
#endif
4242
internal sealed class OrderPreservingPipeliningMergeHelper<TOutput, TKey> : IMergeHelper<TOutput>

src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingPipeliningSpoolingTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
namespace System.Linq.Parallel
2020
{
21-
#if !FEATURE_WASM_THREADS
21+
#if !FEATURE_WASM_MANAGED_THREADS
2222
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
2323
#endif
2424
internal sealed class OrderPreservingPipeliningSpoolingTask<TOutput, TKey> : SpoolingTaskBase

src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/SpoolingTask.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ internal static void SpoolStopAndGo<TInputOutput, TIgnoreKey>(
8282
// taskScheduler - the task manager on which to execute
8383
//
8484

85-
#if !FEATURE_WASM_THREADS
85+
#if !FEATURE_WASM_MANAGED_THREADS
8686
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
8787
#endif
8888
internal static void SpoolPipeline<TInputOutput, TIgnoreKey>(
@@ -264,7 +264,7 @@ protected override void SpoolingFinally()
264264
/// </summary>
265265
/// <typeparam name="TInputOutput"></typeparam>
266266
/// <typeparam name="TIgnoreKey"></typeparam>
267-
#if !FEATURE_WASM_THREADS
267+
#if !FEATURE_WASM_MANAGED_THREADS
268268
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
269269
#endif
270270
internal sealed class PipelineSpoolingTask<TInputOutput, TIgnoreKey> : SpoolingTaskBase

src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/Sorting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ private void QuickSortIndicesInPlace(GrowingArray<TKey> keys, List<TInputOutput>
351351
// negatively impact speedups.
352352
//
353353

354-
#if !FEATURE_WASM_THREADS
354+
#if !FEATURE_WASM_MANAGED_THREADS
355355
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
356356
#endif
357357
private void MergeSortCooperatively()

src/libraries/System.Linq.Parallel/src/System/Linq/ParallelEnumerable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static class ParallelEnumerable
6464

6565
// When running in single partition mode, PLINQ operations will occur on a single partition and will not
6666
// be executed in parallel, but will retain PLINQ semantics (exceptions wrapped as aggregates, etc).
67-
#if !FEATURE_WASM_THREADS
67+
#if !FEATURE_WASM_MANAGED_THREADS
6868
[System.Runtime.Versioning.SupportedOSPlatformGuard("browser")]
6969
internal static bool SinglePartitionMode => OperatingSystem.IsBrowser();
7070
#else

src/libraries/System.Net.Http/src/System.Net.Http.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PropertyGroup>
1212
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
1313
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.PlatformNotSupported_NetHttp</GeneratePlatformNotSupportedAssemblyMessage>
14-
<FeatureWasmThreads Condition="'$(TargetPlatformIdentifier)' == 'browser' and '$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmThreads>
14+
<FeatureWasmManagedThreads Condition="'$(TargetPlatformIdentifier)' == 'browser' and '$(WasmEnableThreads)' == 'true'">true</FeatureWasmManagedThreads>
1515
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'osx' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(TargetPlatformIdentifier)' == 'maccatalyst'">$(DefineConstants);SYSNETHTTP_NO_OPENSSL</DefineConstants>
1616
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'tvos'">$(DefineConstants);TARGET_MOBILE</DefineConstants>
1717
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'android'">$(DefineConstants);TARGET_ANDROID</DefineConstants>
@@ -20,7 +20,7 @@
2020
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'tvos'">$(DefineConstants);TARGET_TVOS</DefineConstants>
2121
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'browser'">$(DefineConstants);TARGET_BROWSER</DefineConstants>
2222
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'wasi'">$(DefineConstants);TARGET_WASI</DefineConstants>
23-
<DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
23+
<DefineConstants Condition="'$(FeatureWasmManagedThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_MANAGED_THREADS</DefineConstants>
2424
<EmitCompilerGeneratedFiles Condition="'$(Configuration)' == 'Debug' and '$(TargetPlatformIdentifier)' == 'browser'">true</EmitCompilerGeneratedFiles>
2525
</PropertyGroup>
2626

src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
1010
<PropertyGroup>
1111
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
12-
<FeatureWasmThreads Condition="'$(TargetPlatformIdentifier)' == 'browser' and '$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmThreads>
12+
<FeatureWasmManagedThreads Condition="'$(TargetPlatformIdentifier)' == 'browser' and '$(WasmEnableThreads)' == 'true'">true</FeatureWasmManagedThreads>
1313
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'browser'">$(DefineConstants);TARGET_BROWSER</DefineConstants>
14-
<DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
14+
<DefineConstants Condition="'$(FeatureWasmManagedThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_MANAGED_THREADS</DefineConstants>
1515
<EmitCompilerGeneratedFiles Condition="'$(Configuration)' == 'Debug' and '$(TargetPlatformIdentifier)' == 'browser'">true</EmitCompilerGeneratedFiles>
1616
</PropertyGroup>
1717

0 commit comments

Comments
 (0)