From aedafd306546cd10419527971694ec232ffe864d Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 10 Jan 2024 15:00:18 +0100 Subject: [PATCH] Remove unwanted attributes from the implementation --- .../System/Threading/ManualResetEventSlim.cs | 18 ------------------ .../src/System/Threading/Monitor.cs | 12 ------------ 2 files changed, 30 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs index b049a9aaeebeb..d4a77457b4a38 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs @@ -344,9 +344,6 @@ public void Reset() /// The caller of this method blocks indefinitely until the current instance is set. The caller will /// return immediately if the event is currently in a set state. /// -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public void Wait() { Wait(Timeout.Infinite, CancellationToken.None); @@ -367,9 +364,6 @@ public void Wait() /// The caller of this method blocks indefinitely until the current instance is set. The caller will /// return immediately if the event is currently in a set state. /// -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public void Wait(CancellationToken cancellationToken) { Wait(Timeout.Infinite, cancellationToken); @@ -390,9 +384,6 @@ public void Wait(CancellationToken cancellationToken) /// /// The maximum number of waiters has been exceeded. /// -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public bool Wait(TimeSpan timeout) { long totalMilliseconds = (long)timeout.TotalMilliseconds; @@ -423,9 +414,6 @@ public bool Wait(TimeSpan timeout) /// /// The maximum number of waiters has been exceeded. /// -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public bool Wait(TimeSpan timeout, CancellationToken cancellationToken) { long totalMilliseconds = (long)timeout.TotalMilliseconds; @@ -449,9 +437,6 @@ public bool Wait(TimeSpan timeout, CancellationToken cancellationToken) /// /// The maximum number of waiters has been exceeded. /// -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public bool Wait(int millisecondsTimeout) { return Wait(millisecondsTimeout, CancellationToken.None); @@ -475,9 +460,6 @@ public bool Wait(int millisecondsTimeout) /// /// was canceled. -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken) { ObjectDisposedException.ThrowIf(IsDisposed, this); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Monitor.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Monitor.cs index 8fe478a52dc9a..37939a7f043d2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Monitor.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Monitor.cs @@ -13,27 +13,15 @@ public static bool TryEnter(object obj, TimeSpan timeout) public static void TryEnter(object obj, TimeSpan timeout, ref bool lockTaken) => TryEnter(obj, WaitHandle.ToTimeoutMilliseconds(timeout), ref lockTaken); -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public static bool Wait(object obj, TimeSpan timeout) => Wait(obj, WaitHandle.ToTimeoutMilliseconds(timeout)); -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public static bool Wait(object obj) => Wait(obj, Timeout.Infinite); // Remoting is not supported, exitContext argument is unused -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public static bool Wait(object obj, int millisecondsTimeout, bool exitContext) => Wait(obj, millisecondsTimeout); // Remoting is not supported, exitContext argument is unused -#if !FEATURE_WASM_THREADS - [UnsupportedOSPlatform("browser")] -#endif public static bool Wait(object obj, TimeSpan timeout, bool exitContext) => Wait(obj, WaitHandle.ToTimeoutMilliseconds(timeout)); }