"jason.greene(a)jboss.com" wrote : "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.
IMO A lazy LRU lock eviction alg that is executed on lock aquire would work very well for
this.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219202#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...