An Alternative Hashing Alternative
Rémi Forax
forax at univ-mlv.fr
Wed Jun 6 19:03:38 UTC 2012
On 06/06/2012 07:23 PM, Doug Lea wrote:
> 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.
tryMonitorEnter is the equivalent of tryLock for synchronized block
(monitorEnter/monitorExit).
>
>>
>> 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.
>
> -Doug
>
Rémi
More information about the core-libs-dev
mailing list