public class ModifiableCountDownLatch extends Object
CountDownLatch
that can have the number of counts increased as well as decreased.Constructor and Description |
---|
ModifiableCountDownLatch(int count) |
Modifier and Type | Method and Description |
---|---|
void |
await()
Waits until the count gets reduced to zero, and then all threads waiting will get to run.
|
void |
countDown()
Decrements the counter.
|
void |
countUp()
Increments the count.
|
public void await() throws InterruptedException
InterruptedException
public void countDown()
await()
to run once the count reaches zero.public void countUp()
Copyright © 2017. All rights reserved.