MCPcopy Create free account
hub / github.com/antlr/codebuff / enterWhenUninterruptibly

Method enterWhenUninterruptibly

output/java_guava/1.4.17/Monitor.java:478–496  ·  view source on GitHub ↗

Enters this monitor when the guard is satisfied. Blocks indefinitely.

(Guard guard)

Source from the content-addressed store, hash-verified

476
477
478 public void enterWhenUninterruptibly(Guard guard) {
479 if (guard.monitor != this) {
480 throw new IllegalMonitorStateException();
481 }
482 final ReentrantLock lock = this.lock;
483 boolean signalBeforeWaiting = lock.isHeldByCurrentThread();
484 lock.lock();
485 boolean satisfied = false;
486 try {
487 if (!guard.isSatisfied()) {
488 awaitUninterruptibly(guard, signalBeforeWaiting);
489 }
490 satisfied = true;
491 } finally {
492 if (!satisfied) {
493 leave();
494 }
495 }
496 }
497
498 /**
499 * Enters this monitor when the guard is satisfied. Blocks at most the given time, including both

Callers 4

awaitRunningMethod · 0.45
awaitTerminatedMethod · 0.45
awaitHealthyMethod · 0.45
awaitStoppedMethod · 0.45

Calls 10

awaitUninterruptiblyMethod · 0.95
leaveMethod · 0.95
toSafeNanosMethod · 0.95
initNanoTimeMethod · 0.95
remainingNanosMethod · 0.95
awaitNanosMethod · 0.95
lockMethod · 0.45
isSatisfiedMethod · 0.45
tryLockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected