RFR: 8188055: (ref) Add Reference::refersTo predicate [v5]

David Holmes david.holmes at oracle.com
Tue Oct 20 11:45:14 UTC 2020


On 20/10/2020 5:51 pm, Kim Barrett wrote:
>> On Oct 20, 2020, at 3:21 AM, David Holmes <david.holmes at oracle.com> wrote:
>>
>> On 20/10/2020 5:01 pm, Kim Barrett wrote:
>>>> On Oct 20, 2020, at 2:09 AM, David Holmes <david.holmes at oracle.com> wrote:
>>>>
>>>> I think that can be addressed by considering a Reference created with a null referent to be immediately cleared.
>>> I think if it’s treated as immediately cleared then it should also be immediately enqueued.  But immediate
>>
>> Mandy's comment implied that references with a null referent never get enqueued. Otherwise when would they get enqueued? There would be nothing to trigger it.
> 
> You said “immediately cleared”; that’s the trigger.  Mandy said “never cleared or enqueued”, which is different.

Mandy said never enqueued and that is what I would expect even if 
considered "immediately cleared". A reference set with null is never 
cleared by the GC, nor ever enqueued, but it is implicitly and trivially 
"cleared" at construction.

"cleared" is just a synonym for "referent == null".

David



More information about the core-libs-dev mailing list