diff --git a/src/libraries/System.Console/tests/ReadAndWrite.cs b/src/libraries/System.Console/tests/ReadAndWrite.cs
index 913d85835dbb18..3e165d38263926 100644
--- a/src/libraries/System.Console/tests/ReadAndWrite.cs
+++ b/src/libraries/System.Console/tests/ReadAndWrite.cs
@@ -158,9 +158,11 @@ public static async Task OutWriteAndWriteLineOverloads()
Console.SetOut(sw);
TextWriter writer = Console.Out;
Assert.NotNull(writer);
- // Browser bypasses SyncTextWriter for faster startup
- if (!OperatingSystem.IsBrowser())
+ // single-threaded WASM bypasses SyncTextWriter for faster startup
+ if (PlatformDetection.IsThreadingSupported)
Assert.NotEqual(writer, sw); // the writer we provide gets wrapped
+ else
+ Assert.Equal(writer, sw); // the writer we provide does not get wrapped
// We just want to ensure none of these throw exceptions, we don't actually validate
// what was written.
diff --git a/src/libraries/System.Console/tests/SyncTextWriter.cs b/src/libraries/System.Console/tests/SyncTextWriter.cs
index 772e1e2b44a915..bcd0b12ddb426d 100644
--- a/src/libraries/System.Console/tests/SyncTextWriter.cs
+++ b/src/libraries/System.Console/tests/SyncTextWriter.cs
@@ -12,7 +12,7 @@
public class SyncTextWriter
{
- // Browser bypasses SyncTextWriter for faster startup
+ // single-threaded WASM bypasses SyncTextWriter for faster startup
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public void SyncTextWriterLockedOnThis()
{
diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
index 1ed17ee58cde75..233d19f0d5b5f4 100644
--- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
+++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
@@ -22,8 +22,6 @@
true
true
true
- true
- $(DefineConstants);FEATURE_WASM_MANAGED_THREADS
$(DefineConstants);BIGENDIAN
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs
index d949017809f825..c328f858f1edca 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs
@@ -759,7 +759,7 @@ public static TextWriter Synchronized(TextWriter writer)
{
ArgumentNullException.ThrowIfNull(writer);
-#if !TARGET_BROWSER || FEATURE_WASM_MANAGED_THREADS
+#if (!TARGET_BROWSER && !TARGET_WASI) || FEATURE_WASM_MANAGED_THREADS
return writer is SyncTextWriter ? writer : new SyncTextWriter(writer);
#else
return writer;
diff --git a/src/libraries/System.Runtime/tests/System.IO.Tests/StreamReader/StreamReader.cs b/src/libraries/System.Runtime/tests/System.IO.Tests/StreamReader/StreamReader.cs
index 29677f512d9f73..efdf66257c31c7 100644
--- a/src/libraries/System.Runtime/tests/System.IO.Tests/StreamReader/StreamReader.cs
+++ b/src/libraries/System.Runtime/tests/System.IO.Tests/StreamReader/StreamReader.cs
@@ -29,7 +29,7 @@ public void ObjectClosedReadLineBaseStream()
Assert.Throws(() => sr.ReadLine());
}
- // Browser bypasses SyncTextWriter for faster startup
+ // single-threaded WASM bypasses SyncTextWriter for faster startup
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public void Synchronized_NewObject()
{
diff --git a/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.cs b/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.cs
index cc09f1c0d2032c..0abbc4d6add34d 100644
--- a/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.cs
+++ b/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.cs
@@ -7,7 +7,7 @@ namespace System.IO.Tests
{
public partial class WriteTests
{
- // Browser bypasses SyncTextWriter for faster startup
+ // single-threaded WASM bypasses SyncTextWriter for faster startup
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public void Synchronized_NewObject()
{
diff --git a/src/libraries/System.Runtime/tests/System.IO.Tests/TextWriter/TextWriterTests.cs b/src/libraries/System.Runtime/tests/System.IO.Tests/TextWriter/TextWriterTests.cs
index 47541635c8eef6..08dc045e4a5b5b 100644
--- a/src/libraries/System.Runtime/tests/System.IO.Tests/TextWriter/TextWriterTests.cs
+++ b/src/libraries/System.Runtime/tests/System.IO.Tests/TextWriter/TextWriterTests.cs
@@ -690,7 +690,7 @@ public void DisposeAsync_ExceptionReturnedInTask()
Assert.Same(e, vt.AsTask().Exception.InnerException);
}
- // Browser bypasses SyncTextWriter for faster startup
+ // single-threaded WASM bypasses SyncTextWriter for faster startup
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public async Task FlushAsync_Precanceled()
{
diff --git a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
index 9137c694aa4ab8..ed02811e9b39a2 100644
--- a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -13,8 +13,6 @@
x64;x86;arm;armv6;arm64;riscv64;s390x;wasm;ppc64le
true
- true
- $(DefineConstants);FEATURE_WASM_MANAGED_THREADS