You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2017/09/01 09:38:01 UTC
[jira] [Resolved] (HTTPCORE-486)
SingleCoreIOReactor.processPendingChannels and
processPendingConnectionRequests should setting time limit
[ https://issues.apache.org/jira/browse/HTTPCORE-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCORE-486.
----------------------------------------
Resolution: Fixed
Fix Version/s: 5.0-beta1
Committed to master with minor changes. Please review and close.
Oleg
> SingleCoreIOReactor.processPendingChannels and processPendingConnectionRequests should setting time limit
> ---------------------------------------------------------------------------------------------------------
>
> Key: HTTPCORE-486
> URL: https://issues.apache.org/jira/browse/HTTPCORE-486
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Components: HttpCore NIO
> Affects Versions: 5.0-alpha3
> Reporter: silver9886
> Fix For: 5.0-beta1
>
>
> in processPendingChannels method
> while ((socketChannel = this.channelQueue.poll()) != null) {
> }
> do not have the time limit.If there are too many socketChannel in the channelQueue
> or there is channelQueue.add in the loop,the SingleCoreIOReactor time will be exhausted
> .That's will block the remaining work to do.
> I suggest using the following code:
> for (int i = 0 ;i < 100000 && (socketChannel = this.channelQueue.poll()) != null;++i) {
> }
> the processPendingConnectionRequests method is the same
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org