Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SemaphoreSlim Methods

The SemaphoreSlim type exposes the following members.

  NameDescription
Public method Dispose() Releases all resources used by the current instance of the SemaphoreSlim class.
Protected method Dispose(Boolean) When overridden in a derived class, releases the unmanaged resources used by the SemaphoreSlim, and optionally releases the managed resources.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Release() Exits the SemaphoreSlim once.
Public method Release(Int32) Exits the SemaphoreSlim a specified number of times.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Wait() Blocks the current thread until it can enter the SemaphoreSlim.
Public method Wait(CancellationToken) Blocks the current thread until it can enter the SemaphoreSlim, while observing a CancellationToken.
Public method Wait(Int32) Blocks the current thread until it can enter the SemaphoreSlim, using a 32-bit signed integer that specifies the timeout.
Public method Wait(TimeSpan) Blocks the current thread until it can enter the SemaphoreSlim, using a TimeSpan to specify the timeout.
Public method Wait(Int32, CancellationToken) Blocks the current thread until it can enter the SemaphoreSlim, using a 32-bit signed integer that specifies the timeout, while observing a CancellationToken.
Public method Wait(TimeSpan, CancellationToken) Blocks the current thread until it can enter the SemaphoreSlim, using a TimeSpan that specifies the timeout, while observing a CancellationToken.
Top

Community Additions

Show:
© 2014 Microsoft