com.google.common.util.concurrent.Monitor.decrementWaiters()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中com.google.common.util.concurrent.Monitor.decrementWaiters()方法的一些代码示例,展示了Monitor.decrementWaiters()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.decrementWaiters()方法的具体详情如下:
包路径:com.google.common.util.concurrent.Monitor
类名称:Monitor
方法名:decrementWaiters

Monitor.decrementWaiters介绍

暂无

代码示例

代码示例来源:origin: org.hudsonci.lib.guava/guava

decrementWaiters(guard);

代码示例来源:origin: org.sonatype.sisu/sisu-guava

decrementWaiters(guard);

代码示例来源:origin: org.hudsonci.lib.guava/guava

decrementWaiters(guard);

代码示例来源:origin: org.sonatype.sisu/sisu-guava

@GuardedBy("lock")
private void waitInterruptibly(Guard guard, boolean signalBeforeWaiting)
  throws InterruptedException {
 if (!guard.isSatisfied()) {
  if (signalBeforeWaiting) {
   signalConditionsOfSatisfiedGuards(null);
  }
  incrementWaiters(guard);
  try {
   final Condition condition = guard.condition;
   do {
    try {
     condition.await();
    } catch (InterruptedException interrupt) {
     try {
      signalConditionsOfSatisfiedGuards(guard);
     } catch (Throwable throwable) {
      Thread.currentThread().interrupt();
      throw Throwables.propagate(throwable);
     }
     throw interrupt;
    }
   } while (!guard.isSatisfied());
  } finally {
   decrementWaiters(guard);
  }
 }
}

代码示例来源:origin: org.hudsonci.lib.guava/guava

@GuardedBy("lock")
private void waitInterruptibly(Guard guard, boolean signalBeforeWaiting)
  throws InterruptedException {
 if (!guard.isSatisfied()) {
  if (signalBeforeWaiting) {
   signalConditionsOfSatisfiedGuards(null);
  }
  incrementWaiters(guard);
  try {
   final Condition condition = guard.condition;
   do {
    try {
     condition.await();
    } catch (InterruptedException interrupt) {
     try {
      signalConditionsOfSatisfiedGuards(guard);
     } catch (Throwable throwable) {
      Thread.currentThread().interrupt();
      throw Throwables.propagate(throwable);
     }
     throw interrupt;
    }
   } while (!guard.isSatisfied());
  } finally {
   decrementWaiters(guard);
  }
 }
}

代码示例来源:origin: org.sonatype.sisu/sisu-guava

decrementWaiters(guard);

代码示例来源:origin: org.hudsonci.lib.guava/guava

@GuardedBy("lock")
private void waitUninterruptibly(Guard guard, boolean signalBeforeWaiting) {
 if (!guard.isSatisfied()) {
  if (signalBeforeWaiting) {
   signalConditionsOfSatisfiedGuards(null);
  }
  incrementWaiters(guard);
  try {
   final Condition condition = guard.condition;
   do {
    condition.awaitUninterruptibly();
   } while (!guard.isSatisfied());
  } finally {
   decrementWaiters(guard);
  }
 }
}

代码示例来源:origin: org.sonatype.sisu/sisu-guava

@GuardedBy("lock")
private void waitUninterruptibly(Guard guard, boolean signalBeforeWaiting) {
 if (!guard.isSatisfied()) {
  if (signalBeforeWaiting) {
   signalConditionsOfSatisfiedGuards(null);
  }
  incrementWaiters(guard);
  try {
   final Condition condition = guard.condition;
   do {
    condition.awaitUninterruptibly();
   } while (!guard.isSatisfied());
  } finally {
   decrementWaiters(guard);
  }
 }
}

相关文章