Semaphore Constructor (Int32, Int32, String, Boolean%)
For apps that target Windows Phone OS 7.0 and 7.1, do not use this member in your app. If you do, your code will throw a MethodAccessException. This member is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
Assembly: System (in System.dll)
[SECURITY CRITICAL]
Namespace:
System.Threading[ 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 Semaphore class, specifying the maximum number of concurrent entries, optionally reserving some entries for the calling thread, optionally specifying the name of a system semaphore object, and specifying a variable that receives a value indicating whether a new system semaphore was created.
Assembly: System (in System.dll)
'Declaration <SecurityCriticalAttribute> _ Public Sub New ( _ initialCount As Integer, _ maximumCount As Integer, _ name As String, _ <OutAttribute> ByRef createdNew As Boolean _ )
Parameters
- initialCount
- Type: System.Int32
The initial number of requests for the semaphore that can be satisfied concurrently.
- maximumCount
- Type: System.Int32
The maximum number of requests for the semaphore that can be satisfied concurrently.
- name
- Type: System.String
The name of a named system semaphore object.
- createdNew
- Type:
System.Boolean
%
When this method returns, contains true if a local semaphore was created (that is, if name is Nothing or an empty string) or if the specified named system semaphore was created; false if the specified named system semaphore already existed. This parameter is passed uninitialized.
Show: