On Sat, Feb 7, 2009 at 5:47 PM, Graham Leggett <minf...@sharp.fm> wrote:
> Brian McCallister wrote:
>
>> So, in mod_lua I need to get the apr pool associated with the current
>> thread (that being the main thread if in prefork).
>
> What about the process_rec structure?
>
> In other words, r->server->process->pool?

I thought this was one-per-process, where process is a real process. I
need one-per-thread in in worker/event so that they don't step on each
other.

What I am looking for is to attach a lua_State instance to that pool,
so that when the thread is retired, I can hook into cleanups, and so
that I can attach the lua_State to the pool as userdata, to retrieve
it later.

In prefork, a process level pool would work fine, but AFAIK this is
not a thread-safe thing.

>
> (Not sure if this is what you are looking for, but a quick glance at the
> headers would suggest it probably does).
>
> Regards,
> Graham
> --
>

Reply via email to