Next: , Previous: , Up: iklib coroutines   [Index]


6.11.4 Suspending and resuming coroutines

Function: suspend-coroutine

Suspend the current coroutine by yielding control to the next one. The continuation of the current coroutine is not enqueued to be reinstated later.

Function: resume-coroutine uid

Given the unique identifier of a suspended coroutine: resume it by enqueueing the current continuation and yielding control to the suspended coroutine.

Function: suspended-coroutine? uid

Return #t if uid is the unique identifier of a suspended coroutine; otherwise return #f. It is an error if uid is not the UID of a coroutine.