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

Re: Thread-Tie-0.01

Elizabeth Mattijsen
August 11, 2002 06:38
Re: Thread-Tie-0.01
Message ID:
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?

Liz Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About