On Sun, Sep 23, 2001 at 05:28:50PM -0700, Ryan Bloom wrote: [...] > Now, thinking this through even more, there is an advantage to allocating out > of the thread pool. The buckets are automatically free'd when the pool > (thread) > goes away. We also get the advantage that in perchild, when the thread dies, > all of the buckets for that thread are free'd immediately, without any special > logic.
I agree that we should be using the thread's pool whenever appropriate for this very reason, but one must also be sure to call apr_thread_exit() to ensure that the thread's pool is destroyed. The thread pool will not be destroyed if the thread dies prematurely for whatever reason. Just an FYI: I intend to change the apr_thread_exit() prototype slightly in the next few days to better accomodate the return status. More details when I submit the patch. -aaron