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.

Previous: , Up: Asyncs   [Contents][Index]


6.21.2.2 User asyncs

A user async is a pair of a thunk (a parameterless procedure) and a mark. Setting the mark on a user async will cause the thunk to be executed when the user async is passed to run-asyncs. Setting the mark more than once is satisfied by one execution of the thunk.

User asyncs are created with async. They are marked with async-mark.

Scheme Procedure: async thunk
C Function: scm_async (thunk)

Create a new user async for the procedure thunk.

Scheme Procedure: async-mark a
C Function: scm_async_mark (a)

Mark the user async a for future execution.

Scheme Procedure: run-asyncs list_of_a
C Function: scm_run_asyncs (list_of_a)

Execute all thunks from the marked asyncs of the list list_of_a.