[jmm-dev] jdk9 APIs
aph at redhat.com
Wed Aug 12 08:26:33 UTC 2015
On 11/08/15 20:11, Doug Lea wrote:
> * I don't want to get overly consumed about analogs of consume mode,
> but it would be nice to deal with it in a way that is good enough not
> to demand follow-up efforts. A different approach than getDependently
> is to add an overloaded loadLoadFence method that restricts its scope
> to loads from the given reference: void loadLoadFence(Object ref).
> This is similar to the approach used in a previous (scrapped) version
> of Fence APIs. JVMs could just equate it (as well as the no-arg
> version) to acquireFence, but with some effort it could be implemented
> to get better performance on some platforms. At the moment, this seems
> like a better approach to me than VarHandle getDependently methods.
I think that's overly optimistic. Given the difficulty of defining
consume(ish) mode in a way that can be understood and the time to get
HotSpot etc. to implement it correctly and efficiently is there a
pressing need to do this now?
More information about the jmm-dev