summaryrefslogtreecommitdiff
path: root/util-misc
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2013-03-23 16:19:19 +0000
committerStefan Fritsch <sf@apache.org>2013-03-23 16:19:19 +0000
commit4f3ebf93351a00404eefeb099bb3e538654b08cc (patch)
tree1635d3c505b8834b1525bc1b2f91673e8d957e43 /util-misc
parent62a763f77e38e8143f6ad142d82f66b6bb779ea1 (diff)
downloadapr-4f3ebf93351a00404eefeb099bb3e538654b08cc.tar.gz
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. This is the last missing part to make the test suite run successfully with full pool debugging enabled. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1460185 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'util-misc')
-rw-r--r--util-misc/apr_thread_pool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-misc/apr_thread_pool.c b/util-misc/apr_thread_pool.c
index 4c19482fb..f5a7a4316 100644
--- a/util-misc/apr_thread_pool.c
+++ b/util-misc/apr_thread_pool.c
@@ -366,8 +366,7 @@ APR_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
@@ -397,7 +396,8 @@ APR_DECLARE(apr_status_t) apr_thread_pool_create(apr_thread_pool_t ** me,
APR_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;
}
/*