RFR: JDK-8074578 Document memory visibility effects of some Unsafe methods
Paul Sandoz
paul.sandoz at oracle.com
Wed Mar 11 09:12:40 UTC 2015
On Mar 10, 2015, at 8:06 PM, Martin Buchholz <martinrb at google.com> wrote:
> I agree with Andrew that the Unsafe API matters, and there are many implementations of it (even multiple within openjdk itself!).
>
> I still know of no reason why my proposed spec is wrong. If C11 support was good and ubiquitous, I would recommend using atomic_compare_exchange_strong or C++ equivalent in the hotspot implementation instead of fences as is done now.
>
> If you think you can write a better spec, please share!
I am all for clearing up the language here, but think it prudent to hold off doing much until the language for JMM revisions and VarHandle is produced, then we can revisit.
Paul.
More information about the core-libs-dev
mailing list