EPollArrayWrapper.release should be O(N), not O(N^2)

Alan Bateman Alan.Bateman at Sun.COM
Wed Nov 4 13:57:04 PST 2009

Martin Buchholz wrote:
> :
> OK, I've renamed ExpensiveCancel to LotsOfCancels and regenerated the 
> webrev.
Looks fine.

>     I'll also look to replace the list in milestone 6 as the
>     close/cancel shouldn't be O(N).
> We were thinking along those lines as well.
> Perhaps a concurrent data structure could be used here as well?
> I think Google engineers will help review.
I haven't seen any contention on the updateList but clearly the change 
to flush pending registrations will change that (that one is 
embarrassing and I'm glad that you/Igor caught this). We just need to 
replace it with something that is directly addressable and supports 
iteration. The original need to preserve ordering can also go away if we 
are careful to convert the pending ops. Also, we can use two 
registratrions lists/whatever so that updateRegistrations can process 
the pending updates concurrently with any threads that are registering 
channels or changing interest ops.


More information about the nio-dev mailing list