All Manuals > LispWorks User Guide and Reference Manual > 49 The SYSTEM Package

NextPrevUpTopContentsIndex

atomic-push

Macro
Summary

Like push, but does the operation atomically.

Package

system

Signature

atomic-push new-value place => new-place-value

Arguments

new-value

An object.

place

One of the specific set of places defined for low level atomic operations.

Values

new-place-value

A list (the new value of place).

Description

The macro atomic-push is the same as cl:push, but is guaranteed atomic for a suitable place.

place must be one of the places described in Low level atomic operations, or expand to one of them.

Notes

In many cases the natural inverse of push is delete, but there is no way to do delete atomically, except by using a separate lock, which must also be held while doing the push.

See also

atomic-pop
low-level-atomic-place-p


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex