Leaves this monitor. May be called only by a thread currently occupying this monitor.
()
| 847 | |
| 848 | |
| 849 | public void leave() { |
| 850 | final ReentrantLock lock = this.lock; |
| 851 | try { |
| 852 | // No need to signal if we will still be holding the lock when we return |
| 853 | if (lock.getHoldCount() == 1) { |
| 854 | signalNextWaiter(); |
| 855 | } |
| 856 | } finally { |
| 857 | lock.unlock(); // Will throw IllegalMonitorStateException if not held |
| 858 | } |
| 859 | } |
| 860 | |
| 861 | /** |
| 862 | * Returns whether this monitor is using a fair ordering policy. |
no test coverage detected