Records that the current thread is no longer waiting on the specified guard.
(Guard guard)
| 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 |
no outgoing calls
no test coverage detected