.NET Framework Class Library |
SemaphoreSlim..::.AvailableWaitHandle Property |
SemaphoreSlim Class See Also Send Feedback |
Returns a WaitHandle that can be used to wait on the semaphore.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public ReadOnly Property AvailableWaitHandle As WaitHandle |
C# |
---|
public WaitHandle AvailableWaitHandle { get; } |
Field Value
A WaitHandle that can be used to wait on the semaphore.Remarks
A successful wait on the AvailableWaitHandle does not imply a successful wait on
the SemaphoreSlim itself, nor does it decrement the semaphore's
count. AvailableWaitHandle exists to allow a thread to block waiting on multiple
semaphores, but such a wait should be followed by a true wait on the target semaphore.
Exceptions
Exception | Condition |
---|---|
System..::.ObjectDisposedException | The SemaphoreSlim has been disposed. |