perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: New ModPerl-Registry/t/ithreads.t test fails on Win32
Date Tue, 08 Feb 2005 00:22:34 GMT
Joe Orton wrote:
> On Mon, Feb 07, 2005 at 05:39:03PM +0000, Steve Hay wrote:
> 
>>What is it with tests called "ithreads.t"?
>>
>>Here's what I get @rev151728:
> 
> 
> This started failing in my Linux builds too as of 2005-02-05 on:
> 
> Perl 5.8.5 on ppc, Perl 5.8.5 on i386, Perl 5.8.3 on i386
> 
> but is passing on:
> 
> Perl 5.8.0 on i386, Perl 5.8.0 on x86_64

threads execution context switching.

> # expected: thread 1
> # thread 2
> # thread 3
> # thread 4
> # parent
> # received: thread 1
> # thread 2
> # thread 3
> # parentthread 4
> not ok 1

Should be fixed in svn. The order is not important for this test.

The better fix would be to join the threads (blocking) before printing in 
the parent, but that's not the point of that test. As XXX states I get 
leaks when adding join(), so I've left those out until someone else or I 
get the time to figure it out.

But this raises an interesting question. What happens if a spawned thread 
didn't have a chance to print before the parent handler has returned. 
Obviously the correct way to program that kind of distributed handler is 
to block in the parent until all threads are done. But still...

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message