STMX is a high-performance implementation of composable Transactional Memory (TM) for Common Lisp. TM is a concurrency control mechanism aimed at making concurrent programming easier to write and understand. Instead of traditional lock-based programming, one programs with atomic memory transactions, which can be composed together to make larger atomic memory transactions.

A memory transaction gets committed if it returns normally, while it gets rolled back if it signals an error (and the error is propagated to the caller).

Finally, memory transactions can safely run in parallel in different threads, are re-executed from the beginning in case of conflicts or if consistent reads cannot be guaranteed, and effects of a memory transaction are not visible from other threads until it commits.

Memory transactions gives freedom from deadlocks, automatic roll-back on failure, and aim at resolving the tension between granularity and concurrency.

General documentation

An introduction is available to explain more in detail what STMX is, what it is not, and how it is implemented. For the complete docs, see the Documentation page.

For background information, Composable Memory Transactions is a very good – though a bit technical – explanation of memory transactions and how they are used and combined. For the interested reader, it also goes in deep detail on how to actually implement them.

Installation and loading

See the Documentation page.