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