develooper Front page | perl.perl5.porters | Postings from April 2003

Re: 5.8.1@19053: threads goofs

Thread Previous | Thread Next
Tim Bunce
April 2, 2003 04:07
Re: 5.8.1@19053: threads goofs
Message ID:
On Tue, Apr 01, 2003 at 01:37:28PM -0800, Ilya Zakharevich wrote:
> On Tue, Apr 01, 2003 at 11:04:55PM +0300, Jarkko Hietaniemi wrote:
> > 	A thread called exit() or die()d while ** other threads were running
> > 
> > Ugh.  Too long.  But if we want to go long how about turn the whole thing
> > around and say:
> > 
> > 	A non-detached thread exited without being joined while ** other threads were running
> This has nothing to do with detach()/join().  Reading the source
> shows: what the message tries to express (but as you can see it does
> not succeed) is that a thread requests the whole process to exit(),
> while this thread is not the last running thread of the process.

Not neccessarily "requests". It's just when an interpretter is being
destroyed by itself for whatever reason. Hence the very general
wording of "A thread exited".

Seems like it is related to detach()/join() in that when a non-detached
thread terminates it effectively waits for another thread to join()
it to collect the result. And, as I understand it, the thread the
does the join() is the one that calls perl_destruct() and so the
"A thread exited" warning isn't generated (see the code).

I think Jarkko's suggestion makes most sense.


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