condition.java

来自「java实现的一个pascal编译器」· Java 代码 · 共 28 行

JAVA
28
字号
package uk.co.brainycreatures.jpascal.type;

/**
 * represents a JPascal Condition type
 */
public class Condition {
  /**
   * suspends the process accessing the procedure
   * where the condition variable is found
   */
  public synchronized void Wait() {
    try {
      wait();
    }
    catch (Exception e) {
    }
  }

  /**
   * resumes the process accessing the procedure
   * containing this variable
   */
  public synchronized void Signal() {
       notifyAll();
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?