apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: thread cleanups needed (?)
Date Thu, 07 Jun 2001 16:19:52 GMT
On Thu, Jun 07, 2001 at 07:55:50AM -0700, rbb@covalent.net wrote:
> 
> Isn't there always a pool associated with a thread?  Register the cleanup
> with that pool, and you should solve your problem.  If not, then the
> thread creation routines should also be creating a sub-pool.  That would
> solve the problem.  I know that was the original plan, but whether I
> implemented it that way or not, I can't remember.

+1.

I don't think this is implemented right now.  A lot of this has to do with 
the interaction with httpd and threaded MPM.  IIRC, httpd has a worker pool 
(specific to a bunch of threads), but no thread-specific pool.

I'd love to see some type of pool that is thread specific.  I've tossed
this idea around, but never got around to it.  At the same time, we 
should add some hooks in the modules to allow them to have
thread-specific initialization.  IMHO, child_init isn't fine-grained 
enough in httpd with threaded MPM.

My problem has always been how to access the thread-specific pool once
it is created.  Especially in the httpd case, you can't always use
apr_threadkey_private (what about prefork MPM?).  There needs to be a
place in the request_rec (I think) for a pool which can only be used at
one time by one worker.  -- justin


Mime
View raw message