RFR: jsr166 jdk9 integration wave 7
Peter Levart
peter.levart at gmail.com
Thu Jun 30 12:41:30 UTC 2016
Hi,
I noticed that in ThreadLocalRandom and Striped64, Unsafe remains for
the sole purpose of accessing 3 fields in java.lang.Thread class. Now
that there are VarHandle(s), they could be combined with SharedSecrets
to get rid of Unsafe access in those two classes. For example, in Striped64:
http://cr.openjdk.java.net/~plevart/misc/JavaLangThreadAccess/webrev.Striped64/
This has the added benefit that IDE(s) can search for usages of
JavaLangThreadAccess.xxx methods to quickly find all the usages. Note
that even though Thread is one of primordial classes, obtaining
VarHandle(s) for its fields is lazy and works without problems...
Regards, Peter
On 06/30/2016 01:20 PM, Martin Buchholz wrote:
> Webrev regenerated with updates.
> Lots of rework for the atomic VarHandle specs.
> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/jsr166-jdk9-integration/
> <http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/jsr166-jdk9-integration/>
>
> In the unlikely case you want the old webrev, it's at
> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/jsr166-jdk9-integration.2016-06-29/
> <http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/jsr166-jdk9-integration.2016-06-29/>
More information about the core-libs-dev
mailing list