SemaphoreSlim.Release Method (Int32)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Exits the SemaphoreSlim a specified number of times.

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

Syntax

Public Function Release ( _
    releaseCount As Integer _
) As Integer
public int Release(
    int releaseCount
)

Parameters

Return Value

Type: System..::.Int32
The previous count of the SemaphoreSlim.

Exceptions

Exception Condition
ObjectDisposedException

The current instance has already been disposed.

ArgumentOutOfRangeException

releaseCount is less than 1.

SemaphoreFullException

The SemaphoreSlim has already reached its maximum size.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0

See Also

Reference

SemaphoreSlim Class

Release Overload

System.Threading Namespace