If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until the lock has been acquired.
Scope of the lock is this multimap only. Acquired lock is only for the key in this multimap. Locks are re-entrant so if the key is locked N times then it should be unlocked N times before another thread can acquire it.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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|