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