The non-local flow of control caused by continuations might sometimes
not be wanted. You can use with-continuation-barrier
to erect
fences that continuations can not pass.
Call proc and return its result. Do not allow the invocation of
continuations that would leave or enter the dynamic extent of the call
to with-continuation-barrier
. Such an attempt causes an error
to be signaled.
Throws (such as errors) that are not caught from within proc are
caught by with-continuation-barrier
. In that case, a short
message is printed to the current error port and #f
is returned.
Thus, with-continuation-barrier
returns exactly once.
void *
scm_c_with_continuation_barrier (void *(*func) (void *), void *data)
¶Like scm_with_continuation_barrier
but call func on
data. When an error is caught, NULL
is returned.