Class CountDownLatch
Inheritance
System.Object
CountDownLatch
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Apache.NMS.Util
Assembly: Apache.NMS.dll
Syntax
public class CountDownLatch
Constructors
CountDownLatch(Int32)
Declaration
public CountDownLatch(int i)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i |
Properties
AsyncWaitHandle
Declaration
public WaitHandle AsyncWaitHandle { get; }
Property Value
Type | Description |
---|---|
System.Threading.WaitHandle |
Remaining
Gets the current count for this Latch.
Declaration
public int Remaining { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
await()
Causes the current Thread to wait for the count to reach zero, unless the Thread is interrupted.
Declaration
public void await()
await(TimeSpan)
Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted, or the specified waiting time elapses.
Declaration
public bool await(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeout |
Returns
Type | Description |
---|---|
System.Boolean |
countDown()
Decrement the count, releasing any waiting Threads when the count reaches Zero.
Declaration
public void countDown()