develooper Front page | perl.perl5.porters | Postings from January 2001

Re: Does perl really need to use sigsetjmp? (18% performancehit)

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
January 20, 2001 17:13
Subject:
Re: Does perl really need to use sigsetjmp? (18% performancehit)
Message ID:
5.0.2.1.0.20010120141407.01f954f0@24.8.96.48
At 06:14 PM 1/20/01 +0000, Nicholas Clark wrote:
>On Tue, Jan 09, 2001 at 02:27:38PM -0500, Dan Sugalski wrote:
> > At 02:20 PM 1/9/01 +0000, Alan Burlison wrote:
>
> > >No, I think you are right.  However the whole
> > >signal/eval/die/setjmp/longjmp mess is pretty much broken anyway, what
> > >with the non-MT safeness and the current bizzare behaviour illustrated
> > >by Raphaels test script.
> > >
> > >I'm still intending to disable sigsetjmp - I havn't heard any decent
> > >reason for it being used.
> > >
> > >Roll on perl6...
> >
> > Well, besides "Just don't *do* that," any thoughts on how to handle this
> > properly in p6?
>
>Why is perl5 using setjmp (of any sort?)  Is it to allow a simpler style of
>exception handling when die() is called?  Simply longjmp direct to the
>enclosing scope, rather than have to write every function to return some
>sort of "I'm dieing" flag, having to test each function called to see if we
>should return immediately to our caller with the die flag (a right faff, and
>probably slow]. In otherwords, to emulate something like the throw and catch
>of C++?
>
>If so, were we intending to use the same idea in perl6?

I'd rather not use setjmp/longjmp in perl 6 if we can avoid it. I 
definitely don't want to design things such that its existence is required.


					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


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