RFR (XS) CR 8014233: java.lang.Thread should be @Contended

David Holmes david.holmes at oracle.com
Thu May 9 10:15:18 UTC 2013

On 9/05/2013 7:53 PM, Aleksey Shipilev wrote:
> On 05/09/2013 01:39 PM, David Holmes wrote:
>> Well the code change is easy enough to review :)
> Ha! Bike-shed opportunity: to use fully quailified class name in the
> annotation, or not. (I'm following the suit for j.u.c.ForkJoinPool and
> friends).
>> As to the effects ... no way to judge that: time and testing will tell.
                                ^for me
> What exactly do you mean by this?

Only that I can't validate the utility of this from simple code 
inspection. As time goes by and the code is put to the test we will find 
out if there are any performance issues/surprises and if there still 
lurk any hidden bugs in the @Contended implementation.


> Testing tells securing against the
> false sharing is fruitful. And letting it drag means it will fire back
> at us sooner or later, and we will waste orders of magnitude more work
> tracing the particular concurrency issue back to Thread.
> -Aleksey.

More information about the core-libs-dev mailing list