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
()
| 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, |
no test coverage detected