RFR: 8293696: java/nio/channels/DatagramChannel/SelectWhenRefused.java fails with "Unexpected wakeup" [v4]
Daniel Fuchs
dfuchs at openjdk.org
Tue Nov 1 18:49:00 UTC 2022
On Tue, 1 Nov 2022 18:37:24 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> I still believe it's interesting to see what key is selected and what's its state. Why is that a problem?
>
> It make no sense because it puts the dc.receive into the loop that is examining the keys. If you really want to look at the state of the key then capture the result of the register method so you can print it out after the selection operation.
I see. So you advise to pass the single key we obtained when registering the channel, to the method, rather than the selected key set. That's OK with me too.
-------------
PR: https://git.openjdk.org/jdk/pull/10851
More information about the nio-dev
mailing list