common/src/main/java/com/genexus/util/Semaphore.java
/** Wait until a permit is available, and take one **/
Wait until a permit is available, and take one
Wait until a permit is available and take one
public void acquire() throws InterruptedException {
    if (Thread.interrupted()) throw new InterruptedException();
    synchronized(this) {
      try {
        while (permits_ <= 0) wait();
        --permits_;
      }
      catch (InterruptedException ex) {
        notify();
        throw ex;
      }
    }
  }
public void acquire ( ) throws InterruptedException { if ( Thread . interrupted ( ) ) throw new InterruptedException ( ) ; synchronized ( this ) { try { while ( permits_ <= 0 ) wait ( ) ; -- permits_ ; } catch ( InterruptedException ex ) { notify ( ) ; throw ex ; } } }
Wait until a permit is available, and take one
Wait until a permit is available and take one