apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1460278 - in /apr/apr-util/branches/1.5.x: ./ misc/apr_thread_pool.c
Date Sun, 24 Mar 2013 07:56:46 GMT
Author: sf
Date: Sun Mar 24 07:56:46 2013
New Revision: 1460278

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

Modified:
    apr/apr-util/branches/1.5.x/   (props changed)
    apr/apr-util/branches/1.5.x/misc/apr_thread_pool.c

Propchange: apr/apr-util/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1460185

Modified: apr/apr-util/branches/1.5.x/misc/apr_thread_pool.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/misc/apr_thread_pool.c?rev=1460278&r1=1460277&r2=1460278&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/misc/apr_thread_pool.c (original)
+++ apr/apr-util/branches/1.5.x/misc/apr_thread_pool.c Sun Mar 24 07:56:46 2013
@@ -363,8 +363,7 @@ APU_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 
@@ -393,7 +392,8 @@ APU_DECLARE(apr_status_t) apr_thread_poo
 
 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;
 }
 
 /*



Mime
View raw message