Next: Mutexes and Condition Variables, Previous: Continuation Barriers, Up: Scheduling
Return the thread that called this function.
Call
thunkin a new thread and with a new dynamic state, returning the new thread. The procedure thunk is called viawith-continuation-barrier.When handler is specified, then thunk is called from within a
catchwith tag#tthat has handler as its handler. This catch is established inside the continuation barrier.Once thunk or handler returns, the return value is made the exit value of the thread and the thread is terminated.
Call body in a new thread, passing it body_data, returning the new thread. The function body is called via
scm_c_with_continuation_barrier.When handler is non-
NULL, body is called viascm_internal_catchwith tagSCM_BOOL_Tthat has handler and handler_data as the handler and its data. This catch is established inside the continuation barrier.Once body or handler returns, the return value is made the exit value of the thread and the thread is terminated.
Wait for thread to terminate and return its exit value. Threads that have not been created with
call-with-new-threadorscm_spawn_threadhave an exit value of#f.
Return
#tiff thread has exited.
If one or more threads are waiting to execute, calling yield forces an immediate context switch to one of them. Otherwise, yield has no effect.
Higher level thread procedures are available by loading the
(ice-9 threads) module. These provide standardized
thread creation.