Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted.
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 one of two things happen:
countDown method; or
If the current thread:
InterruptedException is thrown and the current thread's
interrupted status is cleared.
InterruptedException | if the current thread is interrupted while waiting |
Diagram: Misc