tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_util.c
Date Wed, 04 Aug 2004 16:43:40 GMT
mturk       2004/08/04 09:43:40

  Modified:    ajp/proxy proxy_util.c
  Log:
  Use the worker pool for creating proxy_conn_poll to suppress it's
  destruction when cleaning worker.
  
  Revision  Changes    Path
  1.10      +15 -3     jakarta-tomcat-connectors/ajp/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_util.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- proxy_util.c	4 Aug 2004 15:53:21 -0000	1.9
  +++ proxy_util.c	4 Aug 2004 16:43:39 -0000	1.10
  @@ -1081,9 +1081,16 @@
       apr_pool_t *pool;
       proxy_conn_pool *cp;
       
  -    /* Create a connection pool's subpool */
  +    /* Create a connection pool's subpool. 
  +     * This pool is used for connection recycling.
  +     * Once the worker is added it is never removed but
  +     * it can be disabled.
  +     */
       apr_pool_create(&pool, p);
  -    cp = (proxy_conn_pool *)apr_pcalloc(pool, sizeof(proxy_conn_pool));
  +    /* Alloc from the same pool as worker.
  +     * proxy_conn_pool is permanently attached to the worker. 
  +     */
  +    cp = (proxy_conn_pool *)apr_pcalloc(p, sizeof(proxy_conn_pool));
       cp->pool = pool;
   #if APR_HAS_THREADS
       {
  @@ -1372,7 +1379,12 @@
   #endif
       {
           worker->cp->conn = apr_pcalloc(worker->cp->pool, sizeof(proxy_conn));
  -        /* register the pool cleanup */
  +        /* register the pool cleanup.
  +         * The cleanup is registered on conn_pool pool, so that
  +         * the same mechanism (apr_pool_cleanup) can be used
  +         * for both nonthreaded and threaded servers when closing
  +         * the entire worker.
  +         */
           apr_pool_cleanup_register(worker->cp->pool, (void *)worker->cp->conn,
                                     proxy_conn_cleanup, apr_pool_cleanup_null);      
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message