develooper Front page | perl.ithreads | Postings from August 2002

Re: Thread-Tie-0.01

Thread Previous | Thread Next
From:
jason
Date:
August 12, 2002 01:05
Subject:
Re: Thread-Tie-0.01
Message ID:
87d6spjw6c.fsf@openinformatics.com
"Elizabeth Mattijsen" <liz@dijkmat.nl> writes:

> At 02:53 PM 8/11/02 +0200, Arthur Bergman wrote:
> >> Aha!  So maybe there the "2 other threads were running" message is
> >> coming from, when you only started one other thread.  Does this
> >> shadowy thread run always, even if you don't have threads::shared ?
> 
> >No, the is just a missmg, 2 threads were running.
> 
> Eh... which two threads?
> 
> $ perl -Mthreads -e 'threads->new( sub { 1 while 1 } )'
> A thread exited while 2 other threads were still running.
> ^^^^^^^^^             ^^^^^^^^^^^^^^^
> 
> "A thread" + "2 other threads" = 3.
> 
> There is one main thread.  That thread creates another thread.  That
> makes two.  Where is the third?
> 
> I think the message is in error since there is no third thread.  Or is
> there?  Or is that taking into account the shared variables thread
> that may or may not be running?

I believe that is what Arthur was saying, the message is an error, it
should be saying '2 threads were running', at least that is what I
read.

jas.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About