本文整理了Java中com.google.common.util.concurrent.Monitor.signalConditionsOfSatisfiedGuards()
方法的一些代码示例,展示了Monitor.signalConditionsOfSatisfiedGuards()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.signalConditionsOfSatisfiedGuards()
方法的具体详情如下:
包路径:com.google.common.util.concurrent.Monitor
类名称:Monitor
方法名:signalConditionsOfSatisfiedGuards
暂无
代码示例来源:origin: org.sonatype.sisu/sisu-guava
/**
* Leaves this monitor. May be called only by a thread currently occupying this monitor.
*/
public void leave() {
final ReentrantLock lock = this.lock;
if (!lock.isHeldByCurrentThread()) {
throw new IllegalMonitorStateException();
}
try {
signalConditionsOfSatisfiedGuards(null);
} finally {
lock.unlock();
}
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
/**
* Leaves this monitor. May be called only by a thread currently occupying this monitor.
*/
public void leave() {
final ReentrantLock lock = this.lock;
if (!lock.isHeldByCurrentThread()) {
throw new IllegalMonitorStateException();
}
try {
signalConditionsOfSatisfiedGuards(null);
} finally {
lock.unlock();
}
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
if (!guard.isSatisfied()) {
if (signalBeforeWaiting) {
signalConditionsOfSatisfiedGuards(null);
} catch (InterruptedException interrupt) {
try {
signalConditionsOfSatisfiedGuards(guard);
} catch (Throwable throwable) {
Thread.currentThread().interrupt();
代码示例来源: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.hudsonci.lib.guava/guava
long startNanos = System.nanoTime();
if (signalBeforeWaiting) {
signalConditionsOfSatisfiedGuards(null);
} catch (InterruptedException ignored) {
try {
signalConditionsOfSatisfiedGuards(guard);
} catch (Throwable throwable) {
Thread.currentThread().interrupt();
代码示例来源:origin: org.sonatype.sisu/sisu-guava
if (!guard.isSatisfied()) {
if (signalBeforeWaiting) {
signalConditionsOfSatisfiedGuards(null);
} catch (InterruptedException interrupt) {
try {
signalConditionsOfSatisfiedGuards(guard);
} catch (Throwable throwable) {
Thread.currentThread().interrupt();
代码示例来源:origin: org.sonatype.sisu/sisu-guava
long startNanos = System.nanoTime();
if (signalBeforeWaiting) {
signalConditionsOfSatisfiedGuards(null);
} catch (InterruptedException ignored) {
try {
signalConditionsOfSatisfiedGuards(guard);
} catch (Throwable throwable) {
Thread.currentThread().interrupt();
代码示例来源: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);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!