MacroPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
New since 8.1 release.

pop-atomic

Arguments: place

pop-atomic expands into code that acts like pop 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. A symbol is suitable only if it has been defined as a variable with defvar-nonbindable. If a symbol defined as a variable with defvar (or not defined at all, just used) is specified as the value of place, a compilation error will be signaled when the form is compiled.

This macro was added by a patch released in July, 2009. This macro will not be defined if that patch has not been installed. See sys:update-allegro for information on downloading patches.

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


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page is new in the 8.1 release.
Created 2007.4.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
New since 8.1 release.