Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SemaphoreSlim Methods

.NET Framework 4.6 and 4.5

The SemaphoreSlim type exposes the following members.

  Name Description
Public method Supported by Portable Class Library Dispose() Releases all resources used by the current instance of the SemaphoreSlim class.
Protected method Supported by Portable Class Library Dispose(Boolean) Releases the unmanaged resources used by the SemaphoreSlim, and optionally releases the managed resources.
Public method Supported by Portable Class Library Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Supported by Portable Class Library 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 Supported by Portable Class Library GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method Supported by Portable Class Library GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Supported by Portable Class Library MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Supported by Portable Class Library Release() Releases the SemaphoreSlim object once.
Public method Supported by Portable Class Library Release(Int32) Releases the SemaphoreSlim object a specified number of times.
Public method Supported by Portable Class Library ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Supported by Portable Class Library Wait() Blocks the current thread until it can enter the SemaphoreSlim.
Public method Supported by Portable Class Library Wait(CancellationToken) Blocks the current thread until it can enter the SemaphoreSlim, while observing a CancellationToken.
Public method Supported by Portable Class Library Wait(Int32) Blocks the current thread until it can enter the SemaphoreSlim, using a 32-bit signed integer that specifies the timeout.
Public method Supported by Portable Class Library Wait(TimeSpan) Blocks the current thread until it can enter the SemaphoreSlim, using a TimeSpan to specify the timeout.
Public method Supported by Portable Class Library 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 Supported by Portable Class Library Wait(TimeSpan, CancellationToken) Blocks the current thread until it can enter the SemaphoreSlim, using a TimeSpan that specifies the timeout, while observing a CancellationToken.
Public method WaitAsync() Asynchronously waits to enter the SemaphoreSlim.
Public method WaitAsync(CancellationToken) Asynchronously waits to enter the SemaphoreSlim, while observing a CancellationToken.
Public method WaitAsync(Int32) Asynchronously waits to enter the SemaphoreSlim, using a 32-bit signed integer to measure the time interval.
Public method WaitAsync(TimeSpan) Asynchronously waits to enter the SemaphoreSlim, using a TimeSpan to measure the time interval.
Public method WaitAsync(Int32, CancellationToken) Asynchronously waits to enter the SemaphoreSlim, using a 32-bit signed integer to measure the time interval, while observing a CancellationToken.
Public method WaitAsync(TimeSpan, CancellationToken) Asynchronously waits to enter the SemaphoreSlim, using a TimeSpan to measure the time interval, while observing a CancellationToken.
Top
Show:
© 2015 Microsoft