Skip to content

Commit

Permalink
Remove unwanted attributes from the implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
radekdoulik committed Jan 10, 2024
1 parent 6d85a1e commit aedafd3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </remarks>
#if !FEATURE_WASM_THREADS
[UnsupportedOSPlatform("browser")]
#endif
public void Wait()
{
Wait(Timeout.Infinite, CancellationToken.None);
Expand All @@ -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.
/// </remarks>
#if !FEATURE_WASM_THREADS
[UnsupportedOSPlatform("browser")]
#endif
public void Wait(CancellationToken cancellationToken)
{
Wait(Timeout.Infinite, cancellationToken);
Expand All @@ -390,9 +384,6 @@ public void Wait(CancellationToken cancellationToken)
/// <exception cref="InvalidOperationException">
/// The maximum number of waiters has been exceeded.
/// </exception>
#if !FEATURE_WASM_THREADS
[UnsupportedOSPlatform("browser")]
#endif
public bool Wait(TimeSpan timeout)
{
long totalMilliseconds = (long)timeout.TotalMilliseconds;
Expand Down Expand Up @@ -423,9 +414,6 @@ public bool Wait(TimeSpan timeout)
/// <exception cref="InvalidOperationException">
/// The maximum number of waiters has been exceeded.
/// </exception>
#if !FEATURE_WASM_THREADS
[UnsupportedOSPlatform("browser")]
#endif
public bool Wait(TimeSpan timeout, CancellationToken cancellationToken)
{
long totalMilliseconds = (long)timeout.TotalMilliseconds;
Expand All @@ -449,9 +437,6 @@ public bool Wait(TimeSpan timeout, CancellationToken cancellationToken)
/// <exception cref="InvalidOperationException">
/// The maximum number of waiters has been exceeded.
/// </exception>
#if !FEATURE_WASM_THREADS
[UnsupportedOSPlatform("browser")]
#endif
public bool Wait(int millisecondsTimeout)
{
return Wait(millisecondsTimeout, CancellationToken.None);
Expand All @@ -475,9 +460,6 @@ public bool Wait(int millisecondsTimeout)
/// </exception>
/// <exception cref="OperationCanceledException"><paramref
/// name="cancellationToken"/> was canceled.</exception>
#if !FEATURE_WASM_THREADS
[UnsupportedOSPlatform("browser")]
#endif
public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken)
{
ObjectDisposedException.ThrowIf(IsDisposed, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit aedafd3

Please sign in to comment.