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

Martin Buchholz martinrb at google.com
Thu Mar 9 01:56:22 UTC 2017


Thanks for getting rid of all the flaky sleeps!

I would sleep for less than 50ms on each retry.  I suspect 1ms is typically
enough.

On Wed, Mar 8, 2017 at 12: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/86f64b69/attachment.html>


More information about the nio-dev mailing list