All Manuals > LispWorks User Guide and Reference Manual > 15 Multiprocessing > 15.3 Atomicity and thread safety of the LispWorks implementation

NextPrevUpTopContentsIndex

15.3.4 Issues with order of memory accesses

When multiple threads access the same memory location, the order of those accesses is not generally guaranteed. You should therefore not attempt to implement "lockless algorithms" which depend on the order of memory accesses.

However, all of the atomic operations and locking operations in this chapter do ensure that all memory accesses that happen before them have finished and that all memory accesses that happen after them start after them. Therefore, normally there is nothing special to consider when using these operations. The modification check macros with-modification-change and with-modification-check-macro also take care of this.


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex