You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Cliff Woolley <jw...@virginia.edu> on 2002/06/07 03:54:56 UTC

apr_bucket_poll

[Moved here from dev@httpd.]

On Thu, 6 Jun 2002, Justin Erenkrantz wrote:

> On Thu, Jun 06, 2002 at 04:51:10PM -0700, Aaron Bannert wrote:
> > I'd *love* to see progress on something like this, but whenver I start
> > thinking about this kind of a MPM I run into the problem where brigades
> > (or filter chains) can't be multiplexed over. Is this what you have
> > in mind? (Let's get a discussion going.)
>
> Haven't we talked about adding an apr_bucket_poll function?  I
> don't think I saw any objections to that the previous two times
> we've discussed it, so I guess it's waiting for someone to come
> along and do it.  -- justin

I've objected to it off and on ... in particular forms.  I just don't see
what good apr_bucket_poll would be if you can only poll one bucket, which
is what you'd have to do to be consistent with the other apr_bucket_foo()
functions' semantics.  Polling one bucket at a time is no different than
doing a nonblocking read on each one in a tight loop.  It's the tight loop
obviously that's the problem in either case.

So what we really would need is some way to add a bucket (or a brigade) to
a "pollset" of sorts.  In either case it means that we would need a way to
add individual buckets to a pollset.  But that kind of depends on having
poll() or select() or whatever being able to interact with all of the
kinds of buckets from which reads might block, and that might not be
possible.

I'm kind of just thinking out loud here, but I do think this is easier
said than done...

--Cliff