Re: Fix perl/ithreads random failures
[prev]
[thread]
[next]
[Date index for 2004/12/08]
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.
Right on, Gisle. I was locking it inside the child-threads, but forgot
about the parent. Thanks.
--
__________________________________________________________________
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
 |
 |
Re: Fix perl/ithreads random failures
Stas Bekman 15:31 on 08 Dec 2004
|