httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject Re: How Do I Create A Per-Worker Pool?
Date Thu, 26 Sep 2002 15:06:12 GMT
On Wed, 25 Sep 2002, Charles Reitzel wrote:

> Thanks for the reply.  Forget the worker_rec for the time being.  How do 
> you access the per-thread pool from a module?
> 
> Sorry if I need it spelled out.  But I don't see a pointer to it on the 
> request_rec, the server_rec is process-wide and the child_init() callback 
> is called once-per-process, not once-per-thread, so I am guessing that is 
> the process pool passed in.  What am I missing?
> 
> More info: I am developing with Win32 (mpm_winnt) for now, but I want to 
> deploy to Linux.  I'd like to have things work both places.

You shouldn't be trying to access a per-thread pool.  It isn't
necessary.  The pool in the request-rec, is by definition, only available
within that request, which is limited to a single thread.  The only reason
to access a per-thread pool, is if you want to allocate memory that has
the same lifetime as the thread itself.  There is currently no way to do
that, but there also hasn't been a convincing reason to do it.

Ryan


Mime
View raw message