apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <c...@force-elite.com>
Subject Re: svn commit: r509038 - in /apr/apr/trunk: CHANGES include/apr_poll.h poll/unix/epoll.c poll/unix/kqueue.c test/testpoll.c
Date Wed, 21 Feb 2007 17:36:04 GMT
Joe Orton wrote:
> On Tue, Feb 20, 2007 at 09:02:41AM -0800, Paul Querna wrote:
>> Paul Querna wrote:
> - the size parameter to _create() is documented to constrain the
>   number of descriptors "returned" by _poll(), but that function
>   doesn't really return descriptors.

Righto, it is the maximum number of events that can be handled by a 
single call to _poll();  It is not actually the maximum number of 

> - relatedly; _add() does not enforce the number of descriptors added
>   to "nalloc", nor dynamically grow the pollset; _poll() will crash
>   and burn if the user adds too many descriptors - is that
>   intentional?

Nope, There is no need to dynamically grow the pollset --  The internals 
of the apr_pollcb_t structure do not track the descriptors.  Both KQueue 
and EPoll require an array of (kevent|epoll_event) structures to be 
passed in.  In a single call to the OS event function, they will only 
return up to nalloc events at a time -- There could be more waiting, or 
only 1 returned.

View raw message