![]() | ![]() | ![]() | make-condition-variable | ![]() |
|
| &rest initargs &key class lock => condition-variable | [Function] |
Purpose
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 |
Returns
The created
See also
make-instance
make-lock
make-recursive-lock
with-lock-held
without-lock-held
Examples
Make a
> (make-condition-variable) #<condition-variable> >Make a
> (make-condition-variable :lock (make-recursive-lock)) #<condition-variable> >Define a subclass of
state
(defclass state-cv (condition-variable)
((state :initarg :state
:initform nil
:accessor state-of)))
and then create a state-cv
> (make-condition-variable :class 'state-cv
:lock (make-recursive-lock))
#<state-cv>
>
Note
The make-condition-variable function is equivalent to using
The GBBopen Project
![]() | ![]() | ![]() | make-condition-variable | ![]() |