메소드 | 설명 | |
---|---|---|
Await ( System.TimeSpan duration ) : bool |
Causes the current thread to wait until the latch has counted down to zero, unless Thread.Interrupt() is called on the thread or the specified duration elapses. If the current Count is zero then this method returns immediately. If the current Count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until the count reaches zero due to invocations of the CountDown() method or some other thread calls Thread.Interrupt() on the current thread. A ThreadInterruptedException is thrown if the thread is interrupted. If the specified duration elapses then the value |
|
Await ( ) : void |
Causes the current thread to wait until the latch has counted down to zero, unless Thread.Interrupt() is called on the thread. If the current Count is zero then this method returns immediately. If the current Count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until the count reaches zero due to invocations of the CountDown() method or some other thread calls Thread.Interrupt() on the current thread. |
|
CountDown ( ) : void |
Decrements the count of the latch, releasing all waiting threads if the count reaches zero. If the current Count is greater than zero then it is decremented. If the new count is zero then all waiting threads are re-enabled for thread scheduling purposes. If the current Count equals zero then nothing happens. |
|
CountDownLatch ( int count ) : System |
Constructs a CountDownLatch initialized with the given count.
|
|
ToString ( ) : String |
Returns a string identifying this latch, as well as its state. The state, in brackets, includes the string "Count =" followed by the current count. |
public Await ( System.TimeSpan duration ) : bool | ||
duration | System.TimeSpan | The maximum time to wait. |
리턴 | bool |
public CountDownLatch ( int count ) : System | ||
count | int | the number of times |
리턴 | System |