RFR: 8254146: Avoid unnecessary volatile write on new AtomicBoolean(false)

Сергей Цыпанов github.com+10835776+stsypanov at openjdk.java.net
Thu Oct 22 20:49:14 UTC 2020


On Thu, 22 Oct 2020 20:00:12 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> @cl4es could I ask one more question? Would it be helpful to create a separate PR about removal of explicit zeroing of Atomic* classes (excluding AtomicBoolean), e.g. somethin like this https://github.com/openjdk/jdk/compare/master...stsypanov:atom-simpl ?
>
>> @cl4es could I ask one more question? Would it be helpful to create a separate PR about removal of explicit zeroing of Atomic* classes (excluding AtomicBoolean), e.g. somethin like this [master...stsypanov:atom-simpl](https://github.com/openjdk/jdk/compare/master...stsypanov:atom-simpl) ?
> 
> Sure. Fixing `static final`s is unlikely to matter much, but it's a trivial change and as long as it has a performance advantage it's good to be consistent.
> 
> General advice is to limit sweeping changes to related modules, and not include code maintained in some upstream repo. What you have here looks fine.

DOne https://github.com/openjdk/jdk/pull/818

-------------

PR: https://git.openjdk.java.net/jdk/pull/510


More information about the core-libs-dev mailing list