On Tue, 7 Feb 2023 02:21:32 GMT, Serguei Spitsyn <[email protected]> wrote:

>> Chris Plummer has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Cleaned up removeUnreachableListeners().
>
> src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java line 184:
> 
>> 182:         // We always need to clear the ReferenceQueue
>> 183:         while (listenersReferenceQueue.poll() != null)
>> 184:             ;
> 
> I'm not sure how does this work.
> Do we keep polling if there is any reference object in the queue?
> Can it be an endless loop? Does the poll() remove the reverence object from 
> the queue?

The poll() removes the next object from the queue.

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

PR: https://git.openjdk.org/jdk/pull/12081

Reply via email to