Le 10/06/16 à 03:13, 胡阳 a écrit :
> apache-mina-2.0.13-src
> HI:
> At org.apache.mina.core.polling.AbstractPollingIoProcessor class line 
> 1069,when selected is zero We have to destroy the selector, and register all 
> the socket on a new one to fix 100%  CPU bug. I think there has many case 
> what the Selector is zero. The Channel has some data that be not readed, or 
> the Iterator of selector.keys() not to be cleared. May be at line 1094 "if 
> (selected > 0)" changed to "if (selected >= 0)" is better ? 
> Sorry, my english is very bad.
>
We don't delete the selector because the select() returns 0. We do that
when the select returns 0 before the timeout (1000ms) is reached. If you
try to delete the selector using a condition like (selected >= 0), you
will trash the selector way more than necessary.

Reply via email to