Release Method (Int32)

Task Parallel System.Threading

Exits the SemaphoreSlim a specified number of times.

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

Syntax

Visual Basic (Declaration)
Public Function Release ( _
	releaseCount As Integer _
) As Integer
C#
public int Release(
	int releaseCount
)

Parameters

releaseCount
Type: System..::.Int32
The number of times to exit the semaphore.

Return Value

The previous count of the SemaphoreSlim.

Exceptions

ExceptionCondition
System..::.ArgumentOutOfRangeExceptionreleaseCount is less than 1.
System.Threading..::.SemaphoreFullExceptionThe SemaphoreSlim has already reached its maximum size.
System..::.ObjectDisposedExceptionThe current instance has already been disposed.

See Also