[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: [ID 19991229.003] perl 5.005_03 core dumps -- singal
At 06:59 AM 1/11/00 -0700, Tom Christiansen wrote:
>On Mon, 10 Jan 2000 13:28:16 -0800 (PST)
> Larry Wall <larry@wall.org> wrote
> in <200001102128.NAA15919@kiev.wall.org>:
>
>:We need to delay sub invocations until we know we're in a safe state,
>:such as the beginning of a statement, or at the interator of any looping
>:constructs, including regular expressions.
>
>What about slow-running ops? It seems like some of them require more
>careful work than others.
What we'd need was a wedge into the long-running op at a safe place.
Basically the same code that'd get executed between ops (probably the exact
same code) just done within an op.
We could do this either with an explicit wedge (essentially a yield())
which feels icky, or with an implicit wedge, say in one of the SV
manipulating functions. We might want to have an explicit "interrupts
enable" flag so that the default is to not do this--dunno if it'd be safe
to drop into runops() in the middle of a regex for example.
That still gets us nowhere with potentially long running system calls,
unless there's some way to issue them asynchronously and explicitly wait
for their return, in which case we could treat it as a general event wait
and catch it the same way as we'd catch signals or other async events.
>But what if it's in XS code? How will reliable signal delivery interact
>with XS code?
Well, the wedge method would get us in for anything that didn't block, but
that may not be enough, and it may not be safe to be dropping into runops
from within an XS function anyway. Nobody writes these to be
reentrant-safe. (Though the number of cases where it actually matters is
relatively small)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk
- References to:
-
Tom Christiansen <tchrist@jhereg.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]