On Tue, Mar 17, 2009 at 13:23, Andrej van der Zee
<andrejvander...@gmail.com> wrote:
> Hi,
>
> I was wondering if there is an analogue hook like child_init() for
> threads that I can use for doing some time-consuming
> thread-initialisation that should not slow down an HTTP request
> handler. More specific, I want to initialise some per-thread variables
> that come from a database. Does the APR offer something like this, or
> is there a way to hack this into my module, without changing the APR?

AFAIK there's no support for such thing in apache. Have a look
yourself in server/mpm/worker/worker.c.

You can hook create_connection (the first hook offered by apache in a
thread after its creation). However, create_connection is called
several times during the life of a thread, so you'll need some boolean
to check if you've already initialised the thread-specific data.

S

-- 
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Reply via email to