[concurrency-interest] ConcurrentHashMap computeIfAbsent

Doug Lea dl at cs.oswego.edu
Mon Dec 22 08:34:18 EST 2014


On 12/21/2014 05:32 PM, Doug Lea wrote:
> We should write off coping with deadlock and infinite recursion. But
> we can still add some (cheap) integrity checks that can only be
> violated in the remaining user-error scenarios.

I added some very low overhead checks that improve diagnostic
coverage enough to catch most of these remaining potential user
errors. Given that we cannot in principle catch all of them
(and say so in the specs) this seems to be the best tradeoff.
Adding noticeable time or space overhead would provide only
almost-unnoticeably better diagnosis.

This is committed into jsr166 CVS, and will probably be
integrated as a fix for JDK-8062841.

-Doug




More information about the Concurrency-interest mailing list