- there is 1 lock for resource 'A' and
- acquiring thread gets lockinfo for resource 'A'
- enters the while / wait loop and blocks
- releasing thread gets lockinfo for resource 'A'
- decreases the count to 0, notifies blocking threads
and removes the lockinfo from the map
- acquirig thread wakes up (lockinfo.count == 0) and
increases the count.
the acquiring thread increased the count of a lockinfo
which is no longer registered in the map thus allowing for
another thread to acquire a (exclusive) lock.
Log in to post a comment.