perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject svn commit: r538007 - in /perl/modperl/trunk: Changes src/modules/perl/mod_perl.c
Date Mon, 14 May 2007 22:43:37 GMT
Author: gozer
Date: Mon May 14 15:43:35 2007
New Revision: 538007

URL: http://svn.apache.org/viewvc?view=rev&rev=538007
Log:
Don't waste an extra interpreter anymore under threaded MPMs when using a 
modperl handler. Do just like modperl_handler_cgi does and make sure to
reuse the current interpreter for the response phase.

Submitted-By: Torsten Foertsch <torsten.foertsch@gmx.net>
Reviewed-By: Philippe M. Chiasson
Message-Id: <200704301208.28418.torsten.foertsch@gmx.net>


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

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?view=diff&rev=538007&r1=538006&r2=538007
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Mon May 14 15:43:35 2007
@@ -12,6 +12,9 @@
 
 =item 2.0.4-dev
 
+Don't waste an extra interpreter anymore under threaded MPMs when using a 
+modperl handler [Torsten Foertsch] 
+
 Fix a bug that could cause a crash when using $r->push_handlers() multiple
 times for a phase that has no configured handlers [Torsten Foertsch]
 

Modified: perl/modperl/trunk/src/modules/perl/mod_perl.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/mod_perl.c?view=diff&rev=538007&r1=538006&r2=538007
==============================================================================
--- perl/modperl/trunk/src/modules/perl/mod_perl.c (original)
+++ perl/modperl/trunk/src/modules/perl/mod_perl.c Mon May 14 15:43:35 2007
@@ -1015,6 +1015,7 @@
 int modperl_response_handler(request_rec *r)
 {
     MP_dDCFG;
+    MP_dRCFG;
     apr_status_t retval;
 
 #ifdef USE_ITHREADS
@@ -1029,6 +1030,9 @@
 #ifdef USE_ITHREADS
     interp = modperl_interp_select(r, r->connection, r->server);
     aTHX = interp->perl;
+    if (MpInterpPUTBACK(interp)) {
+        rcfg->interp = interp;
+    }
 #endif
 
     /* default is -SetupEnv, add if PerlOption +SetupEnv */
@@ -1041,6 +1045,7 @@
 #ifdef USE_ITHREADS
     if (MpInterpPUTBACK(interp)) {
         /* PerlInterpScope handler */
+        rcfg->interp = NULL;
         modperl_interp_unselect(interp);
     }
 #endif



Mime
View raw message