[concurrency-interest] ConcurrentHashMap and Unsafe usage

Doug Lea dl at cs.oswego.edu
Wed May 23 19:56:02 EDT 2018


On 05/23/2018 07:40 PM, Kasper Nielsen via Concurrency-interest wrote:
> Hi,
> 
> Now that most of the concurrent data structures in j.u.c have
> transitioned to using VarHandle.
> I was wondering why ConcurrentHashMap still uses Unsafe for its variables?
> 

Bootstrapping. The VM code to compile VarHandles relies on
ConcurrentHashMap. People have looked into somehow changing this, but
nothing seems better than just allowing this to continue.

-Doug



More information about the Concurrency-interest mailing list