[jmm-dev] VarHandle.safepoint() methods

Andrew Haley aph at redhat.com
Thu Jan 5 16:37:31 UTC 2017


On 05/01/17 16:34, Doug Lea wrote:
>> I'm not proposing any change to the MappedByteBuffer API.  What
>> would insert the call to safePointEpoch() ?
>
> Some sort of annotation? I realize that this trades off one kind of
> messiness for another, but users would otherwise need to know to
> use your proposed getSafePoint() method vs plain get(). I can't
> think of anything that automatically does either of these or
> any of Gil's variants.

But users of an unmappable MappedByteBuffer will use exactly the
same API as any other kind of ByteBuffer.  They won't know anything
about safepoints. That's the whole idea.  Any solution which changes
the ByteBuffer API isn't going to fly.

Andrew.



More information about the jmm-dev mailing list