apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1460185 - /apr/apr/trunk/util-misc/apr_thread_pool.c
Date Sat, 23 Mar 2013 16:19:19 GMT
Author: sf
Date: Sat Mar 23 16:19:19 2013
New Revision: 1460185

URL: http://svn.apache.org/r1460185
Log:
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.

Modified:
    apr/apr/trunk/util-misc/apr_thread_pool.c

Modified: apr/apr/trunk/util-misc/apr_thread_pool.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/util-misc/apr_thread_pool.c?rev=1460185&r1=1460184&r2=1460185&view=diff
==============================================================================
--- apr/apr/trunk/util-misc/apr_thread_pool.c (original)
+++ apr/apr/trunk/util-misc/apr_thread_pool.c Sat Mar 23 16:19:19 2013
@@ -366,8 +366,7 @@ APR_DECLARE(apr_status_t) apr_thread_poo
     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_poo
 
 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;
 }
 
 /*



Mime
View raw message