[Top][All Lists]
[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: |
16 Sep 2001 08:47:19 -0000 |
> From: Maciej Stachowiak <address@hidden>
> Date: Sat, 15 Sep 2001 14:53:41 -0700
>
> Actually, I do not understand why call-with-dynamic-root unwinds the
> wind handlers at all. On a practical level, I have not seen a case
> where this behavior is useful on a practical level, and on a
> theoretical level, this code does not really leave the dynamic extent
> of the calling function since it will in fact return to it, so
> unwinding the wind handlers here seems counter-intuitive.
That seems reasonable. Mikael's suggestion that threads start with a
new dynamic context doesn't seem relevant, since threads get a new
dynamic root, unlike the munging of the current root done by
call-with-dynamic-root.
> So rather than seeing a function like this added to Guile, I'd rather
> see the unwinding behavior removed from call-with-dynamic-root, and
> better yet, see a nice function for invoking callbacks that has all
> the desirable properties but does not require filling out structs or
> writing awkward C functions.
I think the cwdr procedure in root.c is almost what you want. Since
scm_apply_with_dynamic_root seems obsolete, cwdr could take a thunk
instead of a1/args. Then rename and export.
Re: Replacement for SCM_SETJMPBUF?, Maciej Stachowiak, 2001/09/15
- Re: Replacement for SCM_SETJMPBUF?,
Gary Houston <=