On Tue, 7 Feb 2023 02:25:45 GMT, Chris Plummer <[email protected]> wrote:

>> The poll() removes the next object from the queue.
>
> This code is a bit odd in that it uses the reference queue to find out if 
> there are one or more unreachable listeners. If there are, then it uses the 
> code below to remove them. So the reference queue is really just a 
> unreachable object detection mechanism, and not used for the actual 
> processing of the objects.

Okay. Thank you for explanation. It looks reasonable then.

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

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

Reply via email to