[Openmcl-devel] Is setf atomic?
Daniel Dickison
danieldickison at gmail.com
Tue Nov 6 13:07:31 PST 2007
On Nov 6, 2007, at 3:47 PM, Pascal Costanza wrote:
> So to get this straight - are you saying that even a setf on a simple
> variable, for example like (setf var 42) when var is not a symbol
> macro, is potentially not thread-safe?
I was actually wondering the same thing a year or so ago in order to
implement a lock-free single-reader/single-writer queue. I never
actually figured it out, but I assumed it would be atomic as far as
the actual assignment goes.
I guess the situation in question boils down to whether 'setq' is
atomic or not. I'm also curious about setf of svref and of car/cdr
(i.e. rplaca/rplacd).
Daniel
More information about the Openmcl-devel
mailing list