httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/mpmt mpmt.c
Date Sun, 09 Jul 2000 18:41:53 GMT
rbb         00/07/09 11:41:53

  Modified:    src/modules/mpm/mpmt mpmt.c
  Log:
  Fix spawning of threads in mpmt_pthread.  This keeps us from overflowing
  MaxClients whenever we use the mpmt MPM in mpmt_pthread mode.
  
  Revision  Changes    Path
  1.6       +4 -4      apache-2.0/src/modules/mpm/mpmt/mpmt.c
  
  Index: mpmt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt/mpmt.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mpmt.c	2000/07/09 04:22:45	1.5
  +++ mpmt.c	2000/07/09 18:41:53	1.6
  @@ -630,6 +630,10 @@
           /* ### return 0 here? */
           clean_child_exit(APEXIT_CHILDFATAL);
       }
  +
  +    pthread_mutex_lock(&worker_thread_count_mutex);
  +    worker_thread_count++;
  +    pthread_mutex_unlock(&worker_thread_count_mutex);
   #else
       worker_thread(my_info);
       /* The SIGTERM shouldn't let us reach this point, but just in case... */
  @@ -846,10 +850,6 @@
       free(ti);
   
       ap_create_pool(&ptrans, tpool);
  -
  -    pthread_mutex_lock(&worker_thread_count_mutex);
  -    worker_thread_count++;
  -    pthread_mutex_unlock(&worker_thread_count_mutex);
   
       ap_setup_poll(&pollset, num_listensocks+1, tpool);
       for(n=0 ; n <= num_listensocks ; ++n)
  
  
  

Mime
View raw message