Code review request 7132889: Possible race conditions in AbstractSelectableChannel

Alan Bateman Alan.Bateman at oracle.com
Wed Aug 8 03:30:42 PDT 2012


On 07/08/2012 14:17, Shirish Kuncolienkar wrote:
>
> I looked at the fix for 6346658 and that will fix the looping issue as 
> reported.  However I feel that there are still issues with regLock vs. 
> keyLock as you pointed out that the synchronization is inconsistent.  
> So I  suggest that you look at the change set once you have some free 
> time.
> -Shirish
>
I think that expanding the scope of regLock in the register and 
configureBlocking methods is right. Changing implCloseChannel requires a 
bit of consideration and I will try to look at it next week. I expect 
that the proposed specification change will not be necessary and that it 
will be solely an implementation change to synchronize on regLock to 
avoid the case that someone registers a channel and gets a valid 
SelectionKey at around the time that the channel is closed.

-Alan.



More information about the nio-dev mailing list