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.AvailableWaitHandle Property

.NET Framework 4.6 and 4.5

Returns a WaitHandle that can be used to wait on the semaphore.

Namespace:  System.Threading
Assemblies:   mscorlib (in mscorlib.dll)
  System.Threading (in System.Threading.dll)

public WaitHandle AvailableWaitHandle { get; }

Property Value

Type: System.Threading.WaitHandle
A WaitHandle that can be used to wait on the semaphore.

ExceptionCondition
ObjectDisposedException

The SemaphoreSlim has been disposed.

Use this property only when you must wait on a SemaphoreSlim together with other kernel-based synchronization objects with the same wait handle. A successful wait on the AvailableWaitHandle does not imply a successful wait on the SemaphoreSlim itself, nor does it decrement the semaphore's count. After the available wait handle is signaled, you should wait on the SemaphoreSlim specifically.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft