"jason.greene(a)jboss.com" wrote : "manik.surtani(a)jboss.com" wrote :
Actually, getLock().4 should read:
| |
| | 4. after acquisition, test that lock acquired is same as lock created in 1,
otherwise unluck, discard lock and try again.
|
| Why is this step needed? If everything is using putIfAbsent you shouldn't have a
problem.
Ah I see this is to handle the case of a blocked/queued thread acquiring a lock. Hmm this
kind of defeats the performance benefit of aqs lock queueing
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219198#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...