apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <p...@querna.org>
Subject Re: Questions about apr_poll
Date Tue, 05 Jan 2010 08:49:55 GMT
On Tue, Jan 5, 2010 at 12:16 AM, Neil Conway <nrc@cs.berkeley.edu> wrote:
> (1) The documentation for apr_pollset_create() states that the "size"
> parameter controls "The maximum number of descriptors that this
> pollset can hold." However, ancient history like
> http://www.mail-archive.com/dev@apr.apache.org/msg12876.html suggests
> that "size" now just controls the # of events that can be signalled by
> a single call to apr_pollset_poll().
> From glancing at the code, it seems that the select provider has a
> fixed limit on the pollset size, but kqueue, epoll and event port do
> not, for example. Is that accurate? Perhaps the apr_pollset
> documentation can be updated accordingly.

Yes, this is correct.

> (2) Is there a reason why apr_pollset_wakeup() was added, but there's
> no analogous apr_pollcb_wakeup()?
> Speaking of which, it might be good to document the high-level
> differences between apr_pollset and apr_pollcb -- without doing some
> digging, it is not at all clear how they differ, or why one might
> prefer one over the other.

pollset_wakeup shouldn't exist imo, its place is in something like the
apr_events_* api that was proposed and never adopted at one point, but
it was added anyways because of a use case needed by tomcat nc (?)

I would prefer to build a higher level apr_events API -- somehting
like libev or libevent, which wrap all event operations for a process,
including user signaled events (which essentially is what _wakeup
provides, events over a pipe), but the API was added awhile ago and is
now set in stone for the foreseeable future.

View raw message