All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

make-unlocked-queue

unlocked-queue-read

unlocked-queue-peek

unlocked-queue-ready

unlocked-queue-send

unlocked-queue-count

unlocked-queue-size

Functions
Summary

Create and use an unlocked-queue object.

Package

hcl

Signature

make-unlocked-queue &key size name => unlocked-queue

unlocked-queue-read unlocked-queue => object

unlocked-queue-peek unlocked-queue => object

unlocked-queue-ready unlocked-queue => result

unlocked-queue-send unlocked-queue object => object

unlocked-queue-count unlocked-queue => count

unlocked-queue-size unlocked-queue object => size

Arguments

size

A positive integer.

name

A Lisp object.

unlocked-queue

An unlocked-queue object.

object

A Lisp object.

Values

count

A positive integer.

object

A Lisp object.

result

A boolean.

size

A positive integer.

Description

The function make-unlocked-queue creates a new, empty unlocked-queue object.

The functions unlocked-queue-read, unlocked-queue-peek, unlocked-queue-ready, unlocked-queue-send, unlocked-queue-count and unlocked-queue-size use an unlocked-queue object.

size is a hint of the maximum number of objects that are expected to be in the queue simultaneously. The queue is extended as needed, so size does not have to be a good guess.

name is used when printing the unlocked-queue and so it is useful for debugging. name is not used otherwise.

unlocked-queue-read checks whether there is anything in the queue, and if so removes the first object in the queue and returns it. Otherwise it returns nil.

unlocked-queue-peek checks whether there is anything in the queue, and if so returns the first object in the queue without modifying the queue. Otherwise it returns nil.

unlocked-queue-ready returns a boolean specifying whether there is anything in the queue.

unlocked-queue-send adds object to the end of the queue, extending the queue if needed. It returns its second argument.

unlocked-queue-count returns the number of objects in the queue.

unlocked-queue-size returns the current size of the queue. Note that it is increased when needed by unlocked-queue-send

See also

make-mailbox
unlocked-queue


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex