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

Chris Vest mr.chrisvest at gmail.com
Tue Nov 27 15:56:15 EST 2012


On 27 November 2012 19:39, Tim Halloran <hallorant at gmail.com> wrote:
>
> (point) The implementation in the JVM could consider a "sloppy"
> matching scheme which ignores the package -- so that, for example,
> com.my.code.Contended works just as well as sun.misc.Contended. This
> is easy to do, and I'm guessing there is an -XX: flag in the work to
> turn the whole scheme off in the unlikely case @Contended means the
> field was discussed in a code inspection (or some other nonsense).
>

You can have a sun.misc package in your own source tree, and putting a
compatible @Contended annotation in there will make the code compile and
load on non-supporting JVMs.

I don't know if it will then break on supporting JVMs, however, if they
start to think the code is talking about a different annotation, which I
guess would be technically correct.


>
> This seems like a useful feature, happy hacking!
>
> Tim
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20121127/36fcf794/attachment.html>


More information about the Concurrency-interest mailing list