程序包 org.antlr.misc

类 Barrier


  • public class Barrier
    extends java.lang.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().
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected int count  
      protected int threshold  
    • 构造器概要

      构造器 
      构造器 说明
      Barrier​(int t)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void action()
      What to do when everyone reaches barrier
      void waitForRelease()  
      • 从类继承的方法 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 java.lang.InterruptedException
        抛出:
        java.lang.InterruptedException
      • action

        public void action()
        What to do when everyone reaches barrier