This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
scm_internal_cwdr unwinds dynamic-winds on entry, and rewinds them on exit. Is there a reason it does that? It is causing a problem for me, as I will explain below. In scwm, many c-implemented primitives allow Scheme callbacks at various points during their operation. Since the window manager code is not in general safe against continuations, a new dynamic root is created for each callback to prevent continuations from being called across the callback boundary. However, that means that such primitives cannot usefully be wrapped in a dynamic-wind form to get save-and-restore semantics for various things, because the dynamic wind will be unwound every time the primitive makes a callback to Scheme code, and rewound when it returns, which is definitely not the behavior I want. Is there any other way I can call Scheme code from C that will prevent calling continuations across the call boundary, but will not unwind dynamic-winds? If not, I would at the very least like to see a version of scm_internal_cwdr that doesn't unwind and rewind, if the old semantics are considered necessary. - Maciej