Hi, > > Note that there is a difference between the apr_thread_data_*() methods and > the apr_threadkey_private_*() methods. The apr_thread_data_*() methods > actually associate your data with the thread->pool. Since each new apr > thread has it's own private thread->pool everything should work fine. > > The apr_threadkey_private_*() methods use the underlying thread libraries > TLS routines. > > While apr_thread_data_* may work for you, true TLS is only supplied by > apr_threadkey_private_* routines. >
Thanks, that's clear! In my case the apr-thread based suffices, I hope. But I realize now that it is difficult or impossible to get the apr_thread_t data from the current thread in an Apache module (for threaded MPMs). Is this possible to do this somehow? For example, does this work: apr_os_thread_t os_thd = apr_os_thread_current (); apr_thread_t *apr_thd; apr_status_t apr_os_thread_put(&apr_thd, &os_thd, r->pool); And what would this do in an MPM prefork? Or maybe there is some better technique? Thank you! Andrej