> > I totally agree, but only as a solution in httpd.
>
> no, everywhere.
>
> > I also believe that we should provide this [application-specific
> > requirement]
> > outside of the basic thread support in APR.
> >
> > Please allow me to use pseudocode:
> >
> > void * worker_function(void * opaque_application_data) {
> >
> > apr_pool_t *thread_pool;
> >
> > create_child_pool(&thread_pool, global_root_pool);
>
> now you've got mutexes in global_root_pool. see my performance comment
> above.
I'm not advocating this scenario as a real solution, but merely trying
to illustrate how the child-pool creation routines don't really have to
be in apr_thread_create(). The application using APR threads can do this
before calling apr_thread_create() or it can do it in it's worker_function.
Either way, it is better to leave it totally up to the application, no?
-aaron