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

Method endWaitingFor

output/java_guava/1.4.17/Monitor.java:1105–1122  ·  view source on GitHub ↗

Records that the current thread is no longer waiting on the specified guard.

(Guard guard)

Source from the content-addressed store, hash-verified

1103 */
1104
1105 @GuardedBy("lock")
1106 private void endWaitingFor(Guard guard) {
1107 int waiters = --guard.waiterCount;
1108 if (waiters == 0) {
1109 // unlink guard from activeGuards
1110 for (Guard p = activeGuards, pred = null; ; pred = p, p = p.next) {
1111 if (p == guard) {
1112 if (pred == null) {
1113 activeGuards = p.next;
1114 } else {
1115 pred.next = p.next;
1116 }
1117 p.next = null; // help GC
1118 break;
1119 }
1120 }
1121 }
1122 }
1123
1124 /*
1125 * Methods that loop waiting on a guard's condition until the guard is satisfied, while recording

Callers 3

awaitMethod · 0.95
awaitUninterruptiblyMethod · 0.95
awaitNanosMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected