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

Method signalNextWaiter

output/java_guava/1.4.17/Monitor.java:1033–1041  ·  view source on GitHub ↗

Signals some other thread waiting on a satisfied guard, if one exists. We manage calls to this method carefully, to signal only when necessary, but never losing a signal, which is the classic problem of this kind of concurrency construct. We must signal if the current thread is about to relinquish

()

Source from the content-addressed store, hash-verified

1031 */
1032
1033 @GuardedBy("lock")
1034 private void signalNextWaiter() {
1035 for (Guard guard = activeGuards; guard != null; guard = guard.next) {
1036 if (isSatisfied(guard)) {
1037 guard.condition.signal();
1038 break;
1039 }
1040 }
1041 }
1042
1043 /**
1044 * Exactly like signalNextWaiter, but caller guarantees that guardToSkip need not be considered,

Callers 5

enterWhenMethod · 0.95
leaveMethod · 0.95
awaitMethod · 0.95
awaitUninterruptiblyMethod · 0.95
awaitNanosMethod · 0.95

Calls 1

isSatisfiedMethod · 0.95

Tested by

no test coverage detected