guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacement for SCM_SETJMPBUF?


From: Gary Houston
Subject: Re: Replacement for SCM_SETJMPBUF?
Date: 15 Sep 2001 13:51:09 -0000

> From: Rob Browning <address@hidden>
> Date: Fri, 14 Sep 2001 18:28:15 -0500
> 
> Rob Browning <address@hidden> writes:
> 
> >> If guppi and scwm both needed this ability then maybe it's a flaw in
> >> Guile that it's not provided.
> >
> > Could be.  I guess it depends on exactly what semantics they really
> > need, and whether or not this is the most appropriate way to provide
> > them.  I don't know enough about what guppi needs to do here to say
> > for sure yet.
> 
> I'm not sure what bits of the current dynamic-root guppi and scwm may
> need, but if it helps us determine whether or not we need to provide
> additional functionality, here's what the main relevant comment in
> guppi says:
> 
> /* Use scm_internal_cwdr to establish a new dynamic root - this causes
>    all throws to be caught and prevents continuations from exiting the
>    dynamic scope of the callback. This is needed to prevent callbacks
>    from disrupting guppi's flow control, which would likely cause a
>    crash. Use scm_internal_stack_catch to save the stack so we can
>    display a backtrace. scm_internal_stack_cwdr is the combination of
>    both. Note that the current implementation causes three(!) distinct
>    catch-like constructs to be used; this may have negative, perhaps
>    even significantly so, performance implications. */
> 
> If there's not a better way to handle things, one possibility might be
> to augment call-with-dynamic-root to take an optional argument:
> 
>   (call-with-dynamic-root . unwind?)
> 
> with a default value of #t.

See also:

http://sources.redhat.com/ml/guile/1998-12/msg00304.html

and follow ups:

http://sources.redhat.com/ml/guile/1998-12/msg00306.html
http://sources.redhat.com/ml/guile/1998-12/msg00305.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]