"bstansberry(a)jboss.com" wrote :
| Can you use a putIfAbsent instead of a get to try to preserve the original lock? Idea
being that if threads are waiting on the original lock you try to keep using it rather
than having them queue up on a new lock.
|
Yes this is better, although still sucks when you have contended access on a Lock. I think
it might make more sense to keep locks around and evict them later, either when the key is
removed/evicted, or some other special lock eviction algorithm that uses timestamps.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219200#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...