4.3 Cooperative Threads
To use cooperative threads, create a threading context with
call-in-main-thread, and perform thread operations—
procedure
(call-in-main-thread thunk) → any/c
thunk : procedure
procedure
thunk : procedure?
procedure
v : any/c
procedure
procedure
v : any/c
procedure
(channel-put ch v) → channel?
ch : channel? v : any/c
procedure
(channel-get ch) → any/c
ch : channel?
Except for thread? and channel?, these procedures can be used only in a threading context. A channel can be used only in the threading context where it was created.
Beware that attempting to use these operations outside of a threading context will not necessarily trigger an error, and may instead deliver an opaque threading request to the enclosing continuation prompt.
procedure
(thread-process-wait process ...) → handle?
process : handle?