Re: Fix perl/ithreads random failures

[prev] [thread] [next] [Date index for 2004/12/08]

From: Stas Bekman
Subject: Re: Fix perl/ithreads random failures
Date: 20:49 on 08 Dec 2004
Gisle Aas wrote:
> I had to do tests with an older version of mod_perl_1.99 that still
> had the perl/ithreads* tests.  I see that these tests was removed from
> the distribution in [1], but I think that if you apply the attached
> patch you can start distribution these tests again.
> 
> [1] http://cvs.apache.org/viewcvs.cgi/modperl-2.0/lib/ModPerl/Manifest.pm?r1=1.9&r2=1.10
> 
> Regards,
> Gisle
> 
> 
> Index: t/response/TestPerl/ithreads.pm
> --- t/response/TestPerl/ithreads.pm.~1~	Wed Dec  8 03:43:55 2004
> +++ t/response/TestPerl/ithreads.pm	Wed Dec  8 03:43:55 2004
> @@ -57,7 +57,10 @@
>                                     $counter_shar += $counter_shar for 1..10;
>                                 });
>          $counter_priv += $counter_priv for 1..10;
> -        $counter_shar += $counter_shar for 1..10;
> +        {
> +	    lock $counter_shar;
> +	    $counter_shar += $counter_shar for 1..10;
> +	}
>          $thr->join;
>          ok t_cmp(2**20, $counter_shar, "shared counter");
>          ok t_cmp(2**10, $counter_priv, "private counter");
> End of Patch.

Thanks Gisle, committed.

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Fix perl/ithreads random failures
Gisle Aas 11:46 on 08 Dec 2004

Re: Fix perl/ithreads random failures
Steve Hay 13:38 on 08 Dec 2004

Re: Fix perl/ithreads random failures
Gisle Aas 14:35 on 08 Dec 2004

Re: Fix perl/ithreads random failures
Steve Hay 14:51 on 08 Dec 2004

Re: Fix perl/ithreads random failures
Stas Bekman 15:33 on 08 Dec 2004

Re: Fix perl/ithreads random failures
Gisle Aas 15:43 on 08 Dec 2004

Re: Fix perl/ithreads random failures
Stas Bekman 15:31 on 08 Dec 2004

Re: Fix perl/ithreads random failures
Stas Bekman 20:49 on 08 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52