apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <...@covalent.net>
Subject RE: worker MPM shutdown
Date Sun, 23 Jun 2002 14:08:35 GMT
> From: Brian Pane [mailto:bpane@pacbell.net]
> 
> On Sat, 2002-06-22 at 17:01, Ryan Bloom wrote:
> > I believe that the problem is platform specific.  The reason that
loop
> > was added, was to allow for graceless shutdown on linux.  On
non-linux
> > platforms, killing the main thread kills the whole process, but on
linux
> > this doesn't work.  The point of closing the sockets was to force
the
> > worker threads to finish ASAP so that the process could die.
> 
> Why not just pthread_kill() all the workers if we're running
> on Linux?  That would be a much more direct way of stopping
> them than closing the sockets.

Because asynchronous cancellation of threads sucks, and APR doesn't
support it.  Most OSes leak memory when you use pthread_kill().

Ryan



Mime
View raw message