httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <>
Subject Re: Terminiting threads in a process RE: [PATCH] Problems with MPM threaded
Date Sat, 14 Jul 2001 20:49:19 GMT
On Sat, Jul 14, 2001 at 01:29:35PM -0700, wrote:
> This is why the original code, in apache-apr, written by Manoj back at IBM
> used two mutexes.  The first was cross-process, the second was
> cross-threads.  It allowed us to handle this much cleaner.  I didn't
> realize this had been removed.
> What you are missing is the history.  All of the problems that we are
> trying to solve were solved already in the original code.  These problem
> are solved most easily by using two mutexes, one for keeping only one
> process in the inner loop, and the inner one for the threads in the
> process.  Then, when you are killing a process, you can easily wake up all
> the threads in the process that are sitting on a lock.

[bird's eye view observation follows:]

I'm beginning to understand why I keep running across parts of APR that
seem inconsistent, overly complicated, disjoint, not generally applicable,
and sometimes seemingly suboptimal. They are holdovers from when they
provided a solution in httpd. I can see how it would be difficult to
form APR for general use when it started out just being code ripped out
of apache. I do think that many of these problems are because APR is
in some places still striving to support the needs of httpd directly,
instead of just providing the basic building blocks that both httpd and
other programs need.

So where to start?


View raw message