apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@apache.org>
Subject Re: New apr_poll() implementation was Re: [PATCH] speed up network timeout processing
Date Sat, 06 Jul 2002 18:37:40 GMT
On Sat, Jul 06, 2002 at 08:32:18AM -0700, Ryan Bloom wrote:
> Because if Apache can't get it right, then I am assuming that nobody
> else can either.  I had originally coded it to use *nsds just as you
> describe below, and it didn't pass any tests, because throughout the
> code people were passing 0 as *nsds.  I decided to fix an API problem
> that I created years ago by using the same variable for both input and
> output parameters in this patch.  I am not tied to adding num, but I do
> believe that it is the correct approach.

I vote to fix httpd rather than add an extra parameter.  Perhaps we
need to make it clearer that *nsds is the number of fd's on input.
But, I know that I was under that impression by reading the docs.
However, I can see where people were confused if they read the docs.

> The small array on the stack is an optimization that I was discussing
> with bpane last night.  It would require some testing to find the right
> number, and I wasn't ready to do that.  I wanted to get the
> implementation out there, and I figured we could continue to optimize it
> once it was done.

Cool.  I'd bet any number >2 will work for our purposes in httpd
as the common case seems to be 2.  But, I do recall 6 being used
somewhere and I can't fathom where I saw that.   -- justin

View raw message