Releases a shared latch, making it available for another thread to use. @return the previous counter value
()
| 136 | * @return the previous counter value |
| 137 | */ |
| 138 | public long countDown() { |
| 139 | sync.releaseShared(0); |
| 140 | long result = getCount(); |
| 141 | if (log.isTraceEnabled()) { |
| 142 | log.trace("Counting down[" + Thread.currentThread().getName() + "] latch=" + result); |
| 143 | } |
| 144 | return result; |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Releases all waiting threads and causes the {@link #limit} to be ignored until {@link #reset()} is called. |