JDK 9 RFR of 8175033: (se) Improve internal timing of java/nio/channels/Selector/WakeupAfterClose.java

Alan Bateman Alan.Bateman at oracle.com
Thu Feb 16 11:56:37 UTC 2017


On 15/02/2017 19:24, Brian Burkhalter wrote:

> Please review at your convenience.
>
> Issue:	https://bugs.openjdk.java.net/browse/JDK-8175033
> Patch:	http://cr.openjdk.java.net/~bpb/8175033/webrev.00/
>
> Improve the probability that the spawned thread will be blocked in select() before the main thread calls close() on the Selector thus hopefully averting the recurrence of [1].
>
I'm not sure that I understand the bug report. The thread calling select 
will periodically throw ClosedSelectorException, that is normal as the 
Selector is closed asynchronously. It seems this is somehow reported by 
the main thread, is that right? I wonder if there is a previous test 
using an uncaught exception handler that is causing interference here. 
If so then I don't think the changes to the test in the patch will help. 
Can you instead change the test to catch the excepted 
ClosedSelectorException?

-Alan


More information about the nio-dev mailing list