RFR: 8338142: (dc) DatagramChannelImpl.blockingReceive can use untimed-park when no timeout set
Daniel Fuchs
dfuchs at openjdk.org
Tue Aug 13 12:57:48 UTC 2024
On Tue, 13 Aug 2024 10:22:58 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> When no timeout is set, DatagramSocket.receive on a virtual thread is currently implemented as a timed receive and a timeout of Long.MAX_VALUE. This came about when this code was changed to avoid pinning issues when calling this method on a virtual thread. It would be better to use an untimed-park for this case, and this would also avoid a long standing issue with overflow in STPE (JDK-8338104).
>
> All tests in tier2 (which has the tests for this API) are passing on all platforms. I don't propose to add further tests at this time.
Look reasonable to me
-------------
Marked as reviewed by dfuchs (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20565#pullrequestreview-2235479382
More information about the nio-dev
mailing list