Releases the lock for the specified key. It never blocks and returns immediately.
If the current thread is the holder of this lock then the hold count is decremented. If the hold count is now zero then the lock is released. If the current thread is not the holder of this lock then {@link IllegalMonitorStateException} is thrown.
Warning:
This method uses
hashCode and
equals of binary form of the
key, not the actual implementations of
hashCode and
equals defined in
key's class.
@param key key to lock.
@throws NullPointerException if the specified key is null
@throws IllegalMonitorStateException if the current thread does not hold this lock