/** * Releases a shared latch, making it available for another thread to use. * @return the previous counter value */ public long countDown() { sync.releaseShared(0); return count.get(); }
/** * Releases a shared latch, making it available for another thread to use. * @return the previous counter value */ public long countDown() { sync.releaseShared(0); long result = getCount(); if (log.isDebugEnabled()) { log.debug("Counting down["+Thread.currentThread().getName()+"] latch="+result); } return result; }
/** * Releases a shared latch, making it available for another thread to use. * @return the previous counter value */ public long countDown() { sync.releaseShared(0); long result = getCount(); if (log.isDebugEnabled()) { log.debug("Counting down["+Thread.currentThread().getName()+"] latch="+result); } return result; }
/** * Releases all waiting threads and causes the {@link #limit} to be ignored * until {@link #reset()} is called. * @return <code>true</code> if release was done */ public boolean releaseAll() { released = true; return sync.releaseShared(0); }
/** * Releases a shared latch, making it available for another thread to use. * @return the previous counter value */ public long countDown() { sync.releaseShared(0); long result = getCount(); if (log.isDebugEnabled()) { log.debug("Counting down["+Thread.currentThread().getName()+"] latch="+result); } return result; }
/** * Releases all waiting threads and causes the {@link #limit} to be ignored * until {@link #reset()} is called. */ public boolean releaseAll() { released = true; return sync.releaseShared(0); }
/** * Releases all waiting threads and causes the {@link #limit} to be ignored * until {@link #reset()} is called. */ public boolean releaseAll() { released = true; return sync.releaseShared(0); }
/** * Releases all waiting threads and causes the {@link #limit} to be ignored * until {@link #reset()} is called. */ public boolean releaseAll() { released = true; return sync.releaseShared(0); }