diff options
author | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2013-03-24 07:56:46 +0000 |
---|---|---|
committer | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2013-03-24 07:56:46 +0000 |
commit | 1d4388f285a00eb6fd0a3c0d97cc4e653a728f30 (patch) | |
tree | 9a191b578193457c9f70df2084ba0867fa013a4d | |
parent | 7bee7741604f4dc3651768566dfa6c379fb4ff54 (diff) | |
download | libapr-util-1d4388f285a00eb6fd0a3c0d97cc4e653a728f30.tar.gz |
Merge r1460185:
kill the threads in the thread pool in a pre-cleanup
This makes sure that the threads are killed when we start destroying
any sub-pools they may be using.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/branches/1.5.x@1460278 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | misc/apr_thread_pool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/apr_thread_pool.c b/misc/apr_thread_pool.c index 01c2e21d..a12f31ab 100644 --- a/misc/apr_thread_pool.c +++ b/misc/apr_thread_pool.c @@ -363,8 +363,7 @@ APU_DECLARE(apr_status_t) apr_thread_pool_create(apr_thread_pool_t ** me, rv = thread_pool_construct(tp, init_threads, max_threads); if (APR_SUCCESS != rv) return rv; - apr_pool_cleanup_register(tp->pool, tp, thread_pool_cleanup, - apr_pool_cleanup_null); + apr_pool_pre_cleanup_register(tp->pool, tp, thread_pool_cleanup); while (init_threads) { /* Grab the mutex as apr_thread_create() and thread_pool_func() will @@ -393,7 +392,8 @@ APU_DECLARE(apr_status_t) apr_thread_pool_create(apr_thread_pool_t ** me, APU_DECLARE(apr_status_t) apr_thread_pool_destroy(apr_thread_pool_t * me) { - return apr_pool_cleanup_run(me->pool, me, thread_pool_cleanup); + apr_pool_destroy(me->pool); + return APR_SUCCESS; } /* |