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

DougLea github.com+2233919+douglea at openjdk.java.net
Wed Oct 7 16:59:10 UTC 2020


On Wed, 7 Oct 2020 16:28:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> @cl4es Thanks. My question was more referring to how the PR tooling should be used these days to notify the
>> maintainers. As JSR166 is a crucial piece of the JDK I was wondering if there might be a way already via a label or
>> something. Or if this needs some good old mail (to concurrency-interest at cs.oswego.edu I suppose?)
>
> You can probably go ahead and ping @DougLea (like this).

I'm a little hesitant about the precedent of checking for 0 in every ctor argument for a volatile field.
An alternative here worth measuring is: VALUE.setRelease(this, initialValue ? 1 : 0);

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

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


More information about the core-libs-dev mailing list