httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <grega...@remulak.net>
Subject Re: [PATCH] get threaded MPM to terminate
Date Wed, 02 May 2001 20:19:23 GMT
"Roy T. Fielding" wrote:
> 
> > > And why does each worker grab a mutex before checking the pipe of death?
> > > All that a worker does is check to see if there is a character on the
> > > pipe and, if so, it tells all of the workers to exit.  So why does it
> > > matter if more than one worker gets inside that exclusion zone?  *shrug*
> >
> > yet another good question.  I'll take a crack at it:
> >
> > when the parent decides to shut down or restart, it writes one character
> > per process on the PoD.  If multiple worker threads within a given
> > process are allowed to each eat a character, some other process may not
> > be woken up .  This stall only occurs under very light loads (e.g.
> > developers running tests).
> 
> Wouldn't the same result be achieved by simply closing the pipe for
> writing? Then when the children attempt to read they get an EOF,
> regardless of how many attempt the read.  This is assuming that the
> parent opens a unique pipe of death per graceful restart, which
> seems to be the case.
> 

hmmmm...sounds reasonable, and sounds like less code too.  Code that's
not there can't break, and can't eat CPU either.  I like it!

Greg (who hasn't checked the unique pipe of death per restart situation)

Mime
View raw message