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

Re: 5.8.1@19053: threads goofs

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
April 3, 2003 13:02
Subject:
Re: 5.8.1@19053: threads goofs
Message ID:
20030403210210.GB6109@math.berkeley.edu
On Thu, Apr 03, 2003 at 10:39:26AM +0100, Tim Bunce wrote:
> > Sorry, cannot parse what you wrote.  The message is shown when on the
> > process termination there are non-joined or detached threads.  Process
> > termination happens when a thread calls exit() or die()s (including
> > implicit exit() at the end of the main program).
> 
> The Perl_ithread_hook() function generates the warning
> if active_threads != 1 and aTHX == PL_curinterp (ie a thread is
> destroying it's 'own' interpreter and not an interpreter created
> for another thread).

How can the latter happen?  Moreover, this does not happen when a
thread terminates non-violently, so your description does look
applicable.

  perl -Mthreads -wle "threads->new(sub{}); sleep 10"

> The Perl_ithread_hook() function is only called by perl_destruct().
> And perl_destruct() has no knowledge of why the interpreter is being
> destroyed.

Please show how this message may be triggered without the process
immediately ending.

Ilya

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