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)
| 754 | |
| 755 | |
| 756 | public void waitFor(Guard guard) throws InterruptedException { |
| 757 | if (! ((guard.monitor == this) & lock.isHeldByCurrentThread())) { |
| 758 | throw new IllegalMonitorStateException(); |
| 759 | } |
| 760 | if (!guard.isSatisfied()) { |
| 761 | await(guard, true); |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | /** |
| 766 | * Waits for the guard to be satisfied. Waits indefinitely. May be called only by a thread |
nothing calls this directly
no test coverage detected