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

Re: 5.8.1@19053: threads goofs

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
April 4, 2003 03:18
Subject:
Re: 5.8.1@19053: threads goofs
Message ID:
20030404111835.GA20158@vipunen.hut.fi
> > > How can the latter happen?  Moreover, this does not happen when a
> > 
> > That can happen very easily.
> 
> Do not see how what you wrote is relevant.

In that case I give up, then.

> > -e 'threads->new(sub{1 while 1})'
> > 
> > The main thread falls off the end, and starts destroying its own
> > interpreter.  The _other_ interpreter is the one patiently executing
> > '1' hoping that '1' will become false.  It's the main thread / main
> > interpreter giving the warning when it's on its way out.  The
> > sub/child thread/interpreter is shutdown more unceremoniously and gets
> > to say nothing.
> 
> What exactly is done when things are done "unceremoniously" and how it

The exit() takes the other threads down since the whole process goes
bye-bye and the main opcode loop(s) with it.

> is related to a thread destroying an interpreter created for another
> thread?  I'm puzzled; there *is* an OS/2 API to shut down a different
> thread; but I did not code any call to it to os2-specific part of Perl.

In general (across all the available OS threading APIs) there is no
portable or semantically consistent way of shutting down a thread.
If you want to write OS2::Thread, that is another issue. 

> > You are right on that the whole process dies but you are confusing
> > effects with side-effects.  The message we are arguing over is caused
> > by a side-effect.  The final effect is, of course, that the whole Perl
> > process dies, but the message is still caused by one particular
> > side-effect, not by the whole death.
> 
> ???  What is the sense for discussing *by what mechanism* this message
> is generated?
> 
> This message has *a purpose*.  It is emited to convey an important
> piece of information to the user.  Many thanks for whoever implemented
> this message.
>
> IMO, the *only* problem with the message is that the wording does not
> correlate well with the purpose of the message.

Good.  I think I am going to change it as soon as I figure out
a couple of other nits I found while looking into the matter.

> Hope this helps,
> Ilya

-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

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