RFR: 8286689: (se) Adjusting to select timeout after EINTR messed up after JDK-8286378

Alan Bateman alanb at openjdk.java.net
Fri May 13 08:42:51 UTC 2022


On Fri, 13 May 2022 08:35:25 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> In the case of `KQueueSelectorImpl.doSelect()`, the `to` is already a `long`, unlike in these 2 classes where it's an `int`. The `to` then gets passed to `KQueue.poll(...)` which expects a `long` timeout unlike in the above 2 classes where the `to` gets passed to methods which expect an `int` timeout. I believe that was the reason the compiler didn't complain in case of `KQueueSelectorImpl`.

Ah yes, I forgot it was a long here. Thanks for checking. However, part of my comment is that there is an inconsistency because KQueueSelectImpl.doSelect wasn't changed to use toMillis. We can create a separate PR to make these consistent if you don't want to include it here.

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

PR: https://git.openjdk.java.net/jdk/pull/8693


More information about the nio-dev mailing list