org.antlr.misc
Class Barrier
java.lang.Object
org.antlr.misc.Barrier
public class Barrier
- extends Object
A very simple barrier wait. Once a thread has requested a
wait on the barrier with waitForRelease, it cannot fool the
barrier into releasing by "hitting" the barrier multiple times--
the thread is blocked on the wait().
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
threshold
protected int threshold
count
protected int count
Barrier
public Barrier(int t)
waitForRelease
public void waitForRelease()
throws InterruptedException
- Throws:
InterruptedException
action
public void action()
- What to do when everyone reaches barrier
Copyright © 2011. All Rights Reserved.