[concurrency-interest] @Contended (JEP-142)

Doug Lea dl at cs.oswego.edu
Tue Nov 27 13:25:31 EST 2012


On 11/27/12 13:08, √iktor Ҡlang wrote:

> I'd say that it serves as a hint to the JVM that padding would help if possible,
> so there wouldn't be a strict need to enforce that it is used. It would be nice
> to be able to ship the same code for different JDKs.
>

But you ship code with sun.misc.Unsafe :-)
As it stands, sun.misc is the place in which non-standard but
universally implemented, platform related, expert-user-only APIs reside.
So seems to be the least controversial home for it. The main
difference is that you won't be able to treat is as assumed to
be present until JDK8. But this is also true of some other
things like upcoming getAndAdd intrinisification.

I'd conclude by saying that other suggestions are welcome, but
they aren't welcome by me :-) This seems like the only
packaging that no one feels like they must try to veto .

-Doug





More information about the Concurrency-interest mailing list