Greg Stein
gstein at lyra.org
Fri Aug 29 16:06:11 EST 2003
On Fri, Aug 29, 2003 at 06:40:46PM -0400, Barry Warsaw wrote: > On Fri, 2003-08-29 at 18:23, Greg Stein wrote: > > > So it does what you want, but yah... a bit ugly. And it really doesn't > > look thread-safe either. You could easily have two threads end up inside > > the 'if' block, registering a cleanup. > > Yep, but right now I'm using a prefork MPM, which I'll probably stick > with for reasons like this. IIUC, each child process is single > threaded, right? Yup, it sure is. If you want to be a Real Man, then you can use _apache.mpm_query to verify that you're running single-threaded :-) btw, if you're going to rely on prefork, then why don't you just use the exit handlers for the process rather than worrying about Apache's pool cleanup handling? If you're doing the latter to work within the Apache framework, then you really ought to keep threads in mind :-) Cheers, -g -- Greg Stein, http://www.lyra.org/
|