[Ecls-list] Special symbols that might benefit from implicit locking or thread-local bindings
Philipp Marek
philipp at marek.priv.at
Mon Aug 1 06:19:53 UTC 2011
Hello Matthew!
> Although GENSYM is more often used in the compile phase (which is
> single-threaded, at least for now), it can also be used by
> multithreaded user code at runtime. Because GENSYM is standard,
> it's unlikely that user code would expect to have to use a lock to
> avoid its internal race conditions around *GENSYM-COUNTER*. So
> possibly that GENSYM should implicitely use a lock, held the whole time
> between the getf and setf.
It should be possible to do that _without_ a lock by using an atomic_incf() or
equivalent operation, right? Nearly all architectures should provide something like
that.
Regards,
Phil
More information about the ecl-devel
mailing list