System.Threading.SemaphoreSlim.WaitAsync Method

Asynchronously waits to enter the System.Threading.SemaphoreSlim, using a 32-bit signed integer to measure the time interval.

Syntax

public System.Threading.Tasks.Task<bool> WaitAsync (int millisecondsTimeout)

Parameters

millisecondsTimeout
The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.

Returns

A task that will complete with a result of true if the current thread successfully entered the System.Threading.SemaphoreSlim, otherwise with a result of false.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0