Warning: This is the manual of the legacy Guile 2.0 series. You may want to read the manual of the current stable series instead.
Next: User asyncs, Up: Asyncs [Contents][Index]
To cause the future asynchronous execution of a procedure in a given
thread, use system-async-mark
.
Automatic invocation of system asyncs can be temporarily disabled by
calling call-with-blocked-asyncs
. This function works by
temporarily increasing the async blocking level of the current
thread while a given procedure is running. The blocking level starts
out at zero, and whenever a safe point is reached, a blocking level
greater than zero will prevent the execution of queued asyncs.
Analogously, the procedure call-with-unblocked-asyncs
will
temporarily decrease the blocking level of the current thread. You
can use it when you want to disable asyncs by default and only allow
them temporarily.
In addition to the C versions of call-with-blocked-asyncs
and
call-with-unblocked-asyncs
, C code can use
scm_dynwind_block_asyncs
and scm_dynwind_unblock_asyncs
inside a dynamic context (see Dynamic Wind) to block or
unblock system asyncs temporarily.
Mark proc (a procedure with zero arguments) for future execution
in thread. When proc has already been marked for
thread but has not been executed yet, this call has no effect.
When thread is omitted, the thread that called
system-async-mark
is used.
This procedure is not safe to be called from signal handlers. Use
scm_sigaction
or scm_sigaction_for_thread
to install
signal handlers.
Call proc and block the execution of system asyncs by one level for the current thread while it is running. Return the value returned by proc. For the first two variants, call proc with no arguments; for the third, call it with data.
The same but with a C function proc instead of a Scheme thunk.
Call proc and unblock the execution of system asyncs by one level for the current thread while it is running. Return the value returned by proc. For the first two variants, call proc with no arguments; for the third, call it with data.
The same but with a C function proc instead of a Scheme thunk.
During the current dynwind context, increase the blocking of asyncs by
one level. This function must be used inside a pair of calls to
scm_dynwind_begin
and scm_dynwind_end
(see Dynamic Wind).
During the current dynwind context, decrease the blocking of asyncs by
one level. This function must be used inside a pair of calls to
scm_dynwind_begin
and scm_dynwind_end
(see Dynamic Wind).
Next: User asyncs, Up: Asyncs [Contents][Index]