perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tors...@apache.org
Subject svn commit: r1299429 - in /perl/modperl/trunk: Changes src/modules/perl/modperl_tipool.c
Date Sun, 11 Mar 2012 19:09:47 GMT
Author: torsten
Date: Sun Mar 11 19:09:47 2012
New Revision: 1299429

URL: http://svn.apache.org/viewvc?rev=1299429&view=rev
Log:
Fix a race condition in our tipool management.
See http://www.gossamer-threads.com/lists/modperl/dev/104026
Patch submitted by: SalusaSecondus <salusa@nationstates.net>

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

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?rev=1299429&r1=1299428&r2=1299429&view=diff
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Sun Mar 11 19:09:47 2012
@@ -12,6 +12,11 @@ Also refer to the Apache::Test changes l
 
 =item 2.0.6-dev
 
+Fix a race condition in our tipool management.
+See http://www.gossamer-threads.com/lists/modperl/dev/104026
+Patch submitted by: SalusaSecondus <salusa@nationstates.net>
+Reviewed by: Torsten Foertsch
+
 Ensure that MP_APXS is set when building on Win32 with MP_AP_PREFIX,
 otherwise the bundled Reload and SizeLimit builds will fail to find a
 properly configured Test environment.

Modified: perl/modperl/trunk/src/modules/perl/modperl_tipool.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_tipool.c?rev=1299429&r1=1299428&r2=1299429&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_tipool.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_tipool.c Sun Mar 11 19:09:47 2012
@@ -328,9 +328,9 @@ static void modperl_tipool_putback_base(
     MP_TRACE_i(MP_FUNC, "0x%lx now available (%d in use, %d running)",
                (unsigned long)listp->data, tipool->in_use, tipool->size);
 
+    modperl_tipool_broadcast(tipool);
     if (tipool->in_use == (tipool->cfg->max - 1)) {
         /* hurry up, another thread may be blocking */
-        modperl_tipool_broadcast(tipool);
         modperl_tipool_unlock(tipool);
         return;
     }



Mime
View raw message