JDK 9 RFR of 8176332: Increase sleep time in java/nio/channels/Selector/ChangingInterests.java write1()

Jon V. sybersnake at gmail.com
Wed Mar 8 21:12:36 UTC 2017


It makes me uneasy that there is this kind of blocking in SocketChannel to
begin with.

On Wed, Mar 8, 2017 at 3:46 PM, Brian Burkhalter <
brian.burkhalter at oracle.com> wrote:

> On Mar 8, 2017, at 8:10 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> To reduce the odds of this happening, this patch increases the pause time
> from 50 to 150 ms, an execution time increase for the test of 400 ms total
> as the method write1() is invoked four times.
>
> This looks okay (longer is okay too) although it would be nice if there
> were a way to avoid the sleep.
>
>
> I created an alternative version http://cr.openjdk.
> java.net/~bpb/8176332/webrev.01/ which does not depend on the
> SocketChannel becoming readable after a fixed sleep. This passed regression
> tests on all the usual platforms.
>
> Thanks,
>
> Brian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170308/28a85b36/attachment.html>


More information about the nio-dev mailing list