Review Request : JDK-8002306, (se) Selector.open fails if invoked with thread interrupt status set [win]
Alan Bateman
Alan.Bateman at oracle.com
Fri Dec 21 08:24:13 PST 2012
On 19/12/2012 20:05, Dan Xu wrote:
> Hi Alan,
>
> Your suggestion makes the code much leaner. I have updated the fix at,
> http://cr.openjdk.java.net/~dxu/8002306/webrev.02/
> <http://cr.openjdk.java.net/%7Edxu/8002306/webrev.02/>
>
> Please help review it. Thanks!
>
> -Dan
This is a lot cleaner. The read/write of ioe is subtle but as there is a
Thread.join then I think it's okay.
At line 101 then can source or sink be null if ioe is not null?
If I read the test correctly then PipeTester waits until it is
interrupted before it calls Pipe.open so this means it will never be
asynchronous. For both PipeTester and and the main thread then I think
it would be better to avoid the busy loop (the main thread can use
Thread.join for example).
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121221/4f4e2712/attachment.html
More information about the nio-dev
mailing list