[concurrency-interest] RFC -- Java7 java.util.concurrent plans
crazybob at crazybob.org
Tue Dec 9 21:31:06 EST 2008
On Tue, Dec 9, 2008 at 5:55 PM, Ben Manes <ben_manes at yahoo.com> wrote:
> I'm curious as to what design aspects make ConcurrentReferenceHashMap
> superior to Google's ReferenceMap. It looks to have implemented its own
> hash table, versus delegating to a backing ConcurrentMap, but I don't
> immediately understand why this is preferable.
ReferenceMap must create an object every time you call get() and it must
repeatedly lock/unlock in some situations whereas ConcurrentReferenceHashMap
can just grab the lock once and get the job done. I haven't looked at the
semantics of CRHM in awhile, but we have plenty of time to hammer those out.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest