Condition variables are a simple one-bit form of concurrent
communication. A condition variable has two states: it starts in the
unsignalled state and later may transition to the
signalled state. When a condition becomes signalled, any
associated waiting operations complete. The following API can be
found in the (fibers conditions)
module.
Make a new condition variable.
Return #t
if obj is a condition variable, or #f
otherwise.
Signal cvar, notifying all waiting fibers and preventing blocking of future fibers waiting on this condition.
Make an operation that will succeed with no values when cvar becomes signalled.
Block the calling fiber until cvar becomes signalled.
Equivalent to (perform-operation (wait-operation cvar))
.