|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.antlr.misc.Barrier
public class Barrier
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().
| Field Summary | |
|---|---|
protected int |
count
|
protected int |
threshold
|
| Constructor Summary | |
|---|---|
Barrier(int t)
|
|
| Method Summary | |
|---|---|
void |
action()
What to do when everyone reaches barrier |
void |
waitForRelease()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int threshold
protected int count
| Constructor Detail |
|---|
public Barrier(int t)
| Method Detail |
|---|
public void waitForRelease()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void action()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||