Like push, but does the operation atomically.
system
atomic-push obj place => new-place-value
obj⇩ |
An object. |
place⇩ |
One of the specific set of places defined for low level atomic operations. |
new-place-value |
A list (the new value of place). |
The macro atomic-push
is the same as cl:push, pushing obj onto the list in place, but is guaranteed atomic for a suitable place.
place must be one of the places described in 19.13.1 Low level atomic operations, or expand to one of them.
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.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02