httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: [PATCH] use new pod code in threaded, get SINGLE_LISTEN_UNS_ACC to work
Date Tue, 19 Jun 2001 22:09:29 GMT
On Tue, 19 Jun 2001, Roy T. Fielding wrote:

> > Because we have to connect() to the server enough times to wake up
> > each thread (ap_daemons_limit * ap_threads_per_child for the threaded
> > MPM), we will end up writing that many '!' characters anyway so there
> > is no harm in more than one thread in a process consuming a char from
> > the pod.  There are plenty to go around.
> >
> > The old pod support unique to threaded only wrote to the pod once per
> > process so it had to ensure that no more than one thread per process
> > would consume a character.
>
> I still don't understand why the parent doesn't just close the pod.
> Anything attempting to read from it will then get an EOF, which happens
> to be more reliable than reading a special character N times.  Furthermore,
> you can then add the pod to the select/poll list so that all of the children
> wake up when it closes (except for the ones working or in accept).
>
> Am I missing something?

The goal was to get the pod out of the select/poll list, so that we can
take advantage of SINGLE_LISTEN_UNSERIALIZED_ACCEPT.  The second piece of
this is also that when the parent wants to get one child process to quit
we want to use the same mechanism as when we want to get all the child
processes to quit.  Namely, send one character down the pipe, and let one
child read it and quit.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message