SemaphoreSlim Constructor (Int32)

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

Initializes a new instance of the SemaphoreSlim class, specifying the initial number of requests that can be granted concurrently.

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

Syntax

Public Sub New ( _
    initialCount As Integer _
)
public SemaphoreSlim(
    int initialCount
)

Parameters

  • initialCount
    Type: System..::.Int32
    The initial number of requests for the semaphore that can be granted concurrently.

Exceptions

Exception Condition
ArgumentOutOfRangeException

initialCount is less than 0.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0

See Also

Reference

SemaphoreSlim Class

SemaphoreSlim Overload

System.Threading Namespace