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


6.11.5 Utility syntaxes for coroutines

Syntax: concurrently ?thunk0 ?thunk

Evaluate the given thunks each in its own coroutine. Return unspecified values when all the coroutines are finished.

Syntax: monitor ?max-coroutines-count ?thunk

Allow only a maximum number of coroutines to concurrently enter the evaluation of ?thunk.

The argument ?max-coroutines-count must be an expression evaluating to a positive integer representing the maximum number of coroutines. It is evaluated only once.

The argument ?thunk must be an expression evaluating to a thunk. It is evaluated only once.