8201315: (se) Allow SelectableChannel.register to be invoked while selection operation is in progress

Brian Burkhalter brian.burkhalter at oracle.com
Wed Apr 11 23:19:08 UTC 2018


On Apr 9, 2018, at 10:56 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> There are two aspect to the compatibility implications:
> 
> 1. 3rd party Selector (or rather SelectorProvider) implementations will need to be updated. These seem few and far between so I'm not too concerned about this.
> 
> 2. Code that synchronizes on the key set in order to get a snapshot of the current registrations. I need help in assessing this but I haven't found any existing code so far where this is an issue. In general, there doesn't seem to be a lot of code synchronizing on the key set, all the action is instead processing the selected-key set.

This second item does indeed appear the more important. I tend to agree with your assessment. The not-cancelled keys in the complement of the selected-key set within the key set are not very interesting. So it seems that code would be more likely to synchronize on the selected-key set.

> http://cr.openjdk.java.net/~alanb/8201315/webrev/index.html

I looked this over and it seems OK. Will need to take another pass once the CSR is in progress.

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180411/fb0551f6/attachment.html>


More information about the nio-dev mailing list