Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/libraries/System.Private.CoreLib/src/System/IO/Stream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ internal Task<int> BeginReadInternal(
}
else
{
#if FEATURE_SINGLE_THREADED
if (OperatingSystem.IsBrowser()) throw new PlatformNotSupportedException();
#endif
#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44543
semaphore.Wait();
#pragma warning restore CA1416
Expand Down Expand Up @@ -496,6 +499,9 @@ internal Task BeginWriteInternal(
}
else
{
#if FEATURE_SINGLE_THREADED
if (OperatingSystem.IsBrowser()) throw new PlatformNotSupportedException();
#endif
#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44543
semaphore.Wait(); // synchronously wait here
#pragma warning restore CA1416
Expand Down
Loading