Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.

Next: , Previous: , Up: SRFI-18   [Contents][Index]


7.5.15.3 SRFI-18 Condition variables

SRFI-18 does not specify a “wait” function for condition variables. Waiting on a condition variable can be simulated using the SRFI-18 mutex-unlock! function described in the previous section.

SRFI-18 condition variables are disjoint from Guile’s primitive condition variables. See Mutexes and Condition Variables, for more on Guile’s primitive facility.

Function: condition-variable? obj

Returns #t if obj is a condition variable, #f otherwise.

Function: make-condition-variable [name]

Returns a new condition variable, optionally assigning it the object name name, which may be any Scheme object.

Function: condition-variable-name condition-variable

Returns the name assigned to condition-variable at the time of its creation, or #f if it was not given a name.

Function: condition-variable-specific condition-variable

Return the “object-specific” property of condition-variable, or #f if none is set.

Function: condition-variable-specific-set! condition-variable obj

Set the “object-specific” property of condition-variable.

Function: condition-variable-signal! condition-variable
Function: condition-variable-broadcast! condition-variable

Wake up one thread that is waiting for condition-variable, in the case of condition-variable-signal!, or all threads waiting for it, in the case of condition-variable-broadcast!.