Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Semaphore Methods

The Semaphore type exposes the following members.

  Name Description
Public method Close When overridden in a derived class, releases all resources held by the current WaitHandle. (Inherited from WaitHandle.)
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Dispose() Releases all resources used by the current instance of the WaitHandle class. (Inherited from WaitHandle.)
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method GetAccessControl Gets the access control security for a named system semaphore.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Static member OpenExisting(String) Opens the specified named semaphore, if it already exists.
Public method Static member OpenExisting(String, SemaphoreRights) Opens the specified named semaphore, if it already exists, with the desired security access.
Public method Release() Exits the semaphore and returns the previous count.
Public method Release(Int32) Exits the semaphore a specified number of times and returns the previous count.
Public method SetAccessControl Sets the access control security for a named system semaphore.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Static member TryOpenExisting(String, Semaphore) Opens the specified named semaphore, if it already exists, and returns a value that indicates whether the operation succeeded.
Public method Static member TryOpenExisting(String, SemaphoreRights, Semaphore) Opens the specified named semaphore, if it already exists, with the desired security access, and returns a value that indicates whether the operation succeeded.
Public method WaitOne() Blocks the current thread until the current WaitHandle receives a signal. (Inherited from WaitHandle.)
Public method WaitOne(Int32) Blocks the current thread until the current WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval. (Inherited from WaitHandle.)
Public method WaitOne(TimeSpan) Blocks the current thread until the current instance receives a signal, using a TimeSpan to specify the time interval. (Inherited from WaitHandle.)
Public method WaitOne(Int32, Boolean) Blocks the current thread until the current WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval and specifying whether to exit the synchronization domain before the wait. (Inherited from WaitHandle.)
Public method WaitOne(TimeSpan, Boolean) Blocks the current thread until the current instance receives a signal, using a TimeSpan to specify the time interval and specifying whether to exit the synchronization domain before the wait. (Inherited from WaitHandle.)
Top
Show:
© 2014 Microsoft. All rights reserved.