Author: stas
Date: Tue Dec 28 07:43:36 2004
New Revision: 123515

URL: http://svn.apache.org/viewcvs?view=rev&rev=123515
Log:
prefork handlers optimisation: don't dup the handler struct unless
this is a threaded-mpm

Modified:
   perl/modperl/trunk/Changes
   perl/modperl/trunk/src/modules/perl/modperl_handler.c

Modified: perl/modperl/trunk/Changes
Url: 
http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?view=diff&rev=123515&p1=perl/modperl/trunk/Changes&r1=123514&p2=perl/modperl/trunk/Changes&r2=123515
==============================================================================
--- perl/modperl/trunk/Changes  (original)
+++ perl/modperl/trunk/Changes  Tue Dec 28 07:43:36 2004
@@ -12,6 +12,9 @@
 
 =item 1.99_20-dev
 
+prefork handlers optimisation: don't dup the handler struct unless
+this is a threaded-mpm [Stas]
+
 deal with a situation where an object is used to construct another
 object, but it's then auto-DESTROYed by perl rendering the object that
 used it corrupted. the solution is to make the newly created objects

Modified: perl/modperl/trunk/src/modules/perl/modperl_handler.c
Url: 
http://svn.apache.org/viewcvs/perl/modperl/trunk/src/modules/perl/modperl_handler.c?view=diff&rev=123515&p1=perl/modperl/trunk/src/modules/perl/modperl_handler.c&r1=123514&p2=perl/modperl/trunk/src/modules/perl/modperl_handler.c&r2=123515
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_handler.c       (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_handler.c       Tue Dec 28 
07:43:36 2004
@@ -201,10 +201,11 @@
     modperl_handler_t *handler = *handp;
 
 #ifdef USE_ITHREADS
-    if (p && !MpHandlerPARSED(handler) && !MpHandlerDYNAMIC(handler)) {
+    if (modperl_threaded_mpm() && p &&
+        !MpHandlerPARSED(handler) && !MpHandlerDYNAMIC(handler)) {
         /*
-         * cannot update the handler structure at request time without
-         * locking, so just copy it
+         * under threaded mpm we cannot update the handler structure
+         * at request time without locking, so just copy it
          */
         handler = *handp = modperl_handler_dup(p, handler);
         duped = 1;

Reply via email to