hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: isStale()
Date Mon, 23 Jun 2008 18:06:40 GMT
On Sun, 2008-06-22 at 23:04 +0200, Quintin Beukes wrote:
> Hey,
> I was busy stepping the NIO code, and noticed the following:
> this.dispatchers[this.currentWorker++ % this.workerCount].addChannel(entry);
> Is this safe? Since currentWorker will eventually wrap around to a
> negative number. It will take a while, a long long while, but I don't
> notice any resets anywhere, so I assume after running for a few
> months, or under extremely high volume it will eventually fail.

I do not think it is unsafe given the fact we are only interested in
more or less equal distribution of new connections among existing
workers, but I agree it would be nice to have the count wrap around to

We happily take patches ;-)

> PS: Of all the open source projects' source code I've worked with,
> HttpComponents have been the biggest pleasure of all. The code is
> very... "intelligable". Sometimes code is over "complexified", or made
> so abstract that one cannot see how things link up with each other, or
> just badly written. Thanks for it all!

I am glad you found source code comprehensible. I hope it is useful too.



To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

View raw message