[concurrency-interest] ConcurrentHashMapV8

√iktor Ҡlang viktor.klang at gmail.com
Mon Oct 3 09:34:38 EDT 2011

Hi Doug,

I'd love to be able to specify a Comparator in the constructor so that
conditional remove doesn't rely on reference-equality or .equals (since
oftentimes I cannot overload it)



On Mon, Oct 3, 2011 at 12:29 AM, Doug Lea <dl at cs.oswego.edu> wrote:

> An update to jsr166e.ConcurrentHashMapV8 includes two
> suggested changes that can affect usage:
> * The "compute" method now supports read-modify-write
> by using a function that provides the previous value.
> * Both computeIfAbsent and compute now throw NullPointerException
> (leaving old mapping or lack thereof intact) if the function returns
> null.
> Plus some other improvements.
> While I'm at it...
> On 09/30/11 12:58, Jason T. Greene wrote:
>>> [... overriding default load factor  ... ]
>> What about just limiting the upper range? I could see someone dropping the
>> default load factor to get marginally better throughput.
> Although even in that case, the overrides were previously
> not handled consistently, and by allowing overridden load
> factor to affect initial sizing, we still support it about
> as well as before, but can now clearly specify the effects.
> The lack of clarity arose from a series of inconsistent
> decisions (some of them mine) to more-or-less mimic
> the already-inconsistent policies of the original HashTable
> class. Unclear enough that if someone wanted to backport
> the CHMV8 code but not the clarified specs to previous JDKs,
> I don't think any user could tell the difference in the
> effects of overriding load factor.
> -Doug
> ______________________________**_________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.**oswego.edu <Concurrency-interest at cs.oswego.edu>
> http://cs.oswego.edu/mailman/**listinfo/concurrency-interest<http://cs.oswego.edu/mailman/listinfo/concurrency-interest>

Viktor Klang

Akka Tech Lead
Typesafe <http://www.typesafe.com/> - Enterprise-Grade Scala from the

Twitter: @viktorklang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20111003/6a9b694d/attachment.html>

More information about the Concurrency-interest mailing list