RFR of JDK-8202481: RegisterDuringSelect.java fails with java.util.concurrent.ExecutionException: java.nio.channels.ClosedSelectorException
Hamlin Li
huaming.li at oracle.com
Thu Jul 12 08:19:40 UTC 2018
On 2018/7/12 3:49 PM, Alan Bateman wrote:
> On 12/07/2018 06:44, Hamlin Li wrote:
>> Hi Alan,
>>
>> Thank you for review, I have updated code in place.
> The additional arrive when ClosedSelectorException may confuse future
> maintainers of this test.
Although theoretically we should invoke "barrier.arriveAndDeregister();"
when catch ClosedSelectorException, but you're right it's not that
necessary, so removed.
> I think the simplest thing is to just return null when
> ClosedSelectorException is thrown and that allows you to remove the
> isOpen check too.
No, we can not remove isOpen check, sel.select(..) could be interrupted
by sel.close() normally, at that situation, we need to exit selectLoop,
that's the code path before we fix the bug.
>
> There is also some left over traces in the patch. I assume they will
> be removed but if you are want to add additional traces then it would
> be good to keep it consistent with the existing messages.
OK
I have updated the webrev in place, please review it again.
Thank you
-Hamlin
>
> -Alan.
More information about the nio-dev
mailing list