MacroPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

push-atomic

Arguments: value place

push-atomic expands into code that acts like push with the same arguments except that the update to place is atomic with respect to all other processes looking at the same place. That is, any number of simultaneous push-atomic and pop-atomic operations on the same location will act as if they occured sequentially in some unspecified order.

If you just used push and pop, on say the list (1 2 3), then two simulaneous pop's could both return 1 rather than one returning 1 and one returning 2. The list at the end of a series of simultaneous push-atomic's or simultaneous pop-atomic's (but not both) will have the expected length and contents, although for a series of push-atomic's the order of the elements is not specified. The result of a series of combined push-atomic's and pop-atomic's may have an indeterminant number of elements if all the elements of the list were popped before any new element were pushed.

Note on the place argument: not all places legal as the first argument of setf can be used as the place argument to this macro. The list of allowable places can be found in Atomic read-modify-write primitives in smp.htm.

See smp.htm and multiprocessing.htm for more information on this macro and on multiprocessing.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version