httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/threaded threaded.c
Date Wed, 02 May 2001 17:46:38 GMT
gregames    01/05/02 10:46:38

  Modified:    server/mpm/threaded threaded.c
  Log:
  simplify the MaxRequestPerChild logic in worker_thread's hot path
  
  Revision  Changes    Path
  1.29      +10 -1     httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -d -b -u -r1.28 -r1.29
  --- threaded.c	2001/04/30 19:24:24	1.28
  +++ threaded.c	2001/05/02 17:46:34	1.29
  @@ -93,6 +93,7 @@
   #include "scoreboard.h" 
   
   #include <signal.h>
  +#include <limits.h>             /* for INT_MAX */
   
   /*
    * Actual definitions of config globals
  @@ -488,7 +489,7 @@
       /* TODO: Switch to a system where threads reuse the results from earlier
          poll calls - manoj */
       while (1) {
  -        workers_may_exit |= (ap_max_requests_per_child != 0) && (requests_this_child
<= 0);
  +        workers_may_exit |= (requests_this_child <= 0);
           if (workers_may_exit) break;
   
           (void) ap_update_child_status(process_slot, thread_slot, SERVER_READY, 
  @@ -1378,6 +1379,14 @@
       }
   
       ap_max_requests_per_child = atoi(arg);
  +    
  +    /* a value of zero means infinity.  The following removes a conditional
  +     * from worker_thread's hot path 
  +     */
  +     
  +    if (!ap_max_requests_per_child) {
  +        ap_max_requests_per_child = INT_MAX; 
  +    }
   
       return NULL;
   }
  
  
  

Mime
View raw message