apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: New apr_poll() implementation
Date Tue, 09 Jul 2002 08:01:59 GMT
> From: Justin Erenkrantz [mailto:jerenkrantz@apache.org]
> Sent: 09 July 2002 09:44

> On Sat, Jul 06, 2002 at 12:11:59PM -0700, Ryan Bloom wrote:
> > parameters.  I would like to fix that mistake for apr_poll now, as long
> > as we are changing the implementation.
> 
> Getting back to this conversation for a brief second, I think the
> additional parameter with the fd count is unneeded (but for a
> different reason than IN/OUT).  The count should be stored in
> apr_pollfd_t - it does not need to be passed into apr_poll().

+1.  It doesn't seem to make sense to keep track of that in the
application.  Mismatch of actual fd count and passed in fd count
is best prevented.
 
> Since you have to call apr_poll_socket_{add|remove}, you can't
> populate apr_pollfd_t on your own (which is something you can do
> with pollfd, hence why poll() needs the count).  apr_poll_setup()
> should take the maximal size and init the counter to 0.  As fds
> are added or removed, the counter is adjusted.

Makes sense, +1.
 
> BTW, we also need apr_poll_file_{add|remove} (seems to be missing
> from rbb's patch).  -- justin

Sander

Mime
View raw message