kill-threadPortable Threadsmake-lockmake-condition-variableGoTo Top

make-condition-variable   &rest initargs &key class lock => condition-variable[Function]

Create a new condition variable.

Package   :portable-threads

Module   :portable-threads

Arguments and values

initargs     An initialization argument list
class     The name of the class for the created condition-variable instance (default is condition-variable)
lock     A lock, a recursive lock, or a condition variable (default is a non-recursive lock)
condition-variable     A condition variable

The created condition-variable.

See also

Make a condition-variable instance with a non-recursive lock:

  > (make-condition-variable)
Make a condition-variable instance with a recursive lock:
  > (make-condition-variable :lock (make-recursive-lock))
Define a subclass of condition-variable that includes a state slot:
  (defclass state-cv (condition-variable)
    ((state :initarg :state
            :initform nil
            :accessor state-of)))
and then create a state-cv instance with a recursive lock:
  > (make-condition-variable :class 'state-cv
                             :lock (make-recursive-lock))

The make-condition-variable function is equivalent to using make-instance with the desired class for the created condition-variable instance. However, using make-condition-variable is preferable stylistically.

The GBBopen Project

kill-threadPortable Threadsmake-lockmake-condition-variableGoTo Top