RFR: 8293696: java/nio/channels/DatagramChannel/SelectWhenRefused.java fails with "Unexpected wakeup" [v4]

Daniel Fuchs dfuchs at openjdk.org
Tue Nov 1 18:27:27 UTC 2022


On Tue, 1 Nov 2022 18:11:11 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   addressing comments
>
> test/jdk/java/nio/channels/DatagramChannel/SelectWhenRefused.java line 136:
> 
>> 134:     }
>> 135: 
>> 136:     static boolean checkUnexpectedWakeup(DatagramChannel dc, Set<SelectionKey> selectedKeys) {
> 
> For the next iteration, would you mind dropping the selectedKeys parameter from this method. It doesn't make sense to be calling dc.receive in this loop. It would be a lot simpler to do the non-blocking dc.receive and print the sender/details when not null.

I still believe it's interesting to see what key is selected and what's its state. Why is that a problem?

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

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


More information about the nio-dev mailing list