JDK 9 RFR of JDK-8068693/8153209: (ch) test java/nio/channels/AsyncCloseAndInterrupt.java failing

Martin Buchholz martinrb at google.com
Wed Apr 6 02:01:16 UTC 2016


On Tue, Apr 5, 2016 at 6:26 PM, Hamlin Li <huaming.li at oracle.com> wrote:
> Hi Martin,
> Thanks for reviewing, please check my comments inline.
>
> -Hamlin
>
> On 2016/4/6 1:23, Martin Buchholz wrote:
>>
>> The use of sleeps in these tests is disturbing.  Occasionally they're
>> necessary, but usually they can be removed. For example
>>
>>   574         do {
>>   575             sleep(50);
>>   576         } while (!t.ready);
>
> Yes, agree with you. But as this piece of code is legacy code, and does not
> cause any testing issue, so I choose to keep it.

Well, yes, but you are introducing a new sleep(100).

My own experience is that 100ms is never long enough to wait for any
other thread to do something.  But this is just a drive by comment - I
don't understand this code enough to understand the purpose of the
sleep.


More information about the nio-dev mailing list