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

Method waitFor

output/java_guava/1.4.17/Monitor.java:758–765  ·  view source on GitHub ↗

Waits for the guard to be satisfied. Waits indefinitely, but may be interrupted. May be called only by a thread currently occupying this monitor. @throws InterruptedException if interrupted while waiting

(Guard guard)

Source from the content-addressed store, hash-verified

756
757
758 public void waitFor(Guard guard) throws InterruptedException {
759 if (! ((guard.monitor == this) & lock.isHeldByCurrentThread())) {
760 throw new IllegalMonitorStateException();
761 }
762 if (!guard.isSatisfied()) {
763 await(guard, true);
764 }
765 }
766
767 /**
768 * Waits for the guard to be satisfied. Waits indefinitely. May be called only by a thread

Callers

nothing calls this directly

Calls 4

awaitMethod · 0.95
toSafeNanosMethod · 0.95
awaitNanosMethod · 0.95
isSatisfiedMethod · 0.45

Tested by

no test coverage detected