An Alternative Hashing Alternative

Doug Lea dl at
Wed Jun 6 17:23:07 UTC 2012

On 06/06/12 13:09, Rémi Forax wrote:
> I haven't read the whole code (I need a blackboard :)

(The mostly-non-blocking retries here lead to a lot of code sprawl.
Macros would help :-)

> I wonder if it's not better to use unsafe.tryMonitorEnter()
> instead of a lock bit.

I need a lock with a form of tryLock, so while I do use built-in
monitors and/or AQS for actual locking, I need to preface use with lock bit
in regular non-tree-bins.

> Also the class depends on LongAdder, is it a requirement or an AtomicLongUpdater
> can be used ?

If this ever makes it as far as contemplating JDK7 ports, a minimal
form of LongAdder could be pulled in as a static inner class.


More information about the core-libs-dev mailing list