8203765: java/nio/channels/Selector/SelectAndClose: add some prints and @intermittent tag

Brian Burkhalter brian.burkhalter at oracle.com
Wed May 30 20:56:53 UTC 2018


On May 30, 2018, at 7:25 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

> On May 30, 2018, at 12:19 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
>> Good, I think this is the right approach as it re-works the test now as the issues are clear. A few comments:
> 
> It was an excellent idea - thanks.
> 
>> - no need to add the intermittent tag, that may be left over from your original patch
> 
> Shall excise.
> 
>> - most of the comment on mightHoldKeySetLock can be replaced with a comment to say that selection operations are specified to synchronize on the selected key set.
> 
> I realize it’s overkill. I was clarifying it for myself.
> 
>> Also there is nothing in this method that knows anything about selector or the selected-key set so it could be renamed (to drop "KeySet") and the comment can be moved to the while loop in main where it calls the method with the selected-key set.
> 
> Yes, I thought of that.
> 
>> - no need for the try/catch around selector.close, it's okay to have the main method throw IOException
> 
> Will change before the push.

All suggested changes have been made [1] and tested on all platforms. In addition I removed the “closed” variable and the testing of it as it now seems pointless.

Thanks,

Brian

[1] http://cr.openjdk.java.net/~bpb/8203765/webrev.03/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180530/17259b21/attachment.html>


More information about the nio-dev mailing list