I've always felt that it's better to have concurrency properties declared
as part of the type, guided by C++ atomic<>, and VarHandle was a step away
from that (towards concurrency "assembly language").  It's more difficult
in Java where there are no zero-cost user abstractions (yet!).

I'm worried about a hardware dependent performance cliff when the size of
an object grows beyond some word size and locks need to be used.

Java still needs that revised memory model, but it's very difficult to get
right.

Reply via email to