MCPcopy Create free account
hub / github.com/antlr/codebuff / leave

Method leave

output/java_guava/1.4.17/Monitor.java:849–859  ·  view source on GitHub ↗

Leaves this monitor. May be called only by a thread currently occupying this monitor.

()

Source from the content-addressed store, hash-verified

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.

Callers 15

enterWhenMethod · 0.95
startAsyncMethod · 0.45
stopAsyncMethod · 0.45
awaitRunningMethod · 0.45
awaitTerminatedMethod · 0.45
notifyStartedMethod · 0.45
notifyStoppedMethod · 0.45
notifyFailedMethod · 0.45
addListenerMethod · 0.45
tryStartTimingMethod · 0.45
markReadyMethod · 0.45

Calls 2

signalNextWaiterMethod · 0.95
unlockMethod · 0.45

Tested by

no test coverage detected