RFR (M) #4 CR 8003985: Support @Contended annotation

mark.reinhold at oracle.com mark.reinhold at oracle.com
Fri Dec 21 09:10:56 PST 2012


2012/12/21 2:40 -0800, alan.bateman at oracle.com:
> On 21/12/2012 10:20, Aleksey Shipilev wrote:
>> This is the final call for reviews for @Contended:
>> http://cr.openjdk.java.net/~shade/8003985/webrev.00/

The copyright line in Contended.java says 2005.

>> ...
> 
> Has sun.misc.Contended been decided? I really think this needs to be moved to
> somewhere that can be supported, like jdk.vm.Contented. I did bring this up on
> c-i and Doug replied, I just haven't had the time to follow up on it.

I don't think we should make any kind of support commitment to this
annotation at this time.  In this release it's intended only for use by
the java.util.concurrent implementation.  (Yes, I recognize that others
will use it explicitly, but they'll be playing with fire.)

If this annotation belongs anywhere else than sun.misc then that's in
a package whose name contains the string "internal", which is the only
means we have now of identifying an API as being strictly for internal
use.  Given that @Contains is closely related to sun.misc.Unsafe, though,
and given that the sun.misc package will most likely disappear in JDK 9,
I can live with it being in sun.misc for JDK 8.

- Mark


More information about the hotspot-dev mailing list