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.

take it easy,
Charlie


On On Wed, 25 Sep 2002, Ryan Bloom wrote:
>On Wed, 25 Sep 2002, Charles Reitzel wrote:
> > Objective: to create a mutex-free pool per worker in non-MPM-specific
> > way.
> > ...
> >
> > I found this exchange in a June posting:
> >
> >> Just do:
> >>   apr_allocator_t *allocator;
> >>   apr_allocator_create(&allocator);
> >>   apr_pool_create_ex(&pool, parent_pool, abort_fn, allocator);
> >>   apr_allocator_owner_set(allocator, pool);
> > ...
> >
> > Looks good. But I have questions. What is the correct place to
> > put this code and where do keep the pool pointer afterwards. I.e.
> > how do you find the pool from within a module handler?
> > ...
>
>The structures in Apache are designed around an HTTP request, not the 
>entity that is running the request. Every threaded MPM has a pool for each 
>thread, which does allow for thread-safe programming. Why exactly would 
>you want a worker_rec? What problem are you having? Ryan

Reply via email to