Create a Semaphore with the given initial number of permits.
Using a seed of 1 makes the semaphore act as a mutual exclusion lock.
Negative seeds are also allowed, in which case no acquires will proceed until the number of releases has pushed the number of permits past 0.
|Permits||Return the current number of available permits. Returns an accurate, but possibly unstable value, that may change immediately after returning.|
|Acquire||Acquire a permit|
|Attempt||Wait at most msecs millisconds for a permit|
|Equals (inherited from Object)||Determines whether the specified Object is equal to the current Object.|
|GetHashCode (inherited from Object)||Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.|
|GetType (inherited from Object)||Gets the Type of the current instance.|
|Release||Overloaded. Release a permit|
|ToString (inherited from Object)||Returns a String that represents the current Object.|
|nPermits||current number of available permits|
|Finalize (inherited from Object)||Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.|
|MemberwiseClone (inherited from Object)||Creates a shallow copy of the current Object.|