On 11/29/2013 12:12 PM, Nick Kew wrote:
Take a look at apr_reslist. It may be even better than you'd hoped.
This does look exciting. If I am understanding my casual reading of its
header correctly what I can do is create the resource list during
child_init, and ensure it has enough slots for the number of threads in the
MPM. Then in the request handler I simply request the resource, and its
constructor will create the connection to the FastCGI server, or give me an
already establish connection if one is free. This then neatly side-steps
another problem I thought I would be facing which is the lack of a
per-thread version of child_init. Am I reading this all correctly?
Actually I just had another thought. In the child_init handler I can
pre-prime the resource list and actually open the connections for as many
as AP_MPMQ_MAX_THREADS threads exist, so that there isn't even the initial
delay the first time a thread needs a connection.
I hope I am getting the hang of what you were suggesting.
Sincerely,
Kean