RFR: 8314480: Memory ordering spec updates in java.lang.ref
Brent Christian
bchristi at openjdk.org
Wed Nov 29 02:23:07 UTC 2023
On Sat, 18 Nov 2023 01:55:00 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Perhaps it's sufficient to say simply that, _"the garbage collector will no longer enqueue this object."_
>
> Is this sentence needed? Excluding the race scenario as described in the javadoc, it would be equivalent as if the Reference with null referent which will never get enqueued?
I personally think it's worth clearly stating that calling `clear()` opts you out of getting the GC notification that you signed up for when you registering this Reference with a RefQ.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16644#discussion_r1408648376
More information about the core-libs-dev
mailing list