3 ms·
The Clojure dialect of Lisp comes with a software transactional memory (STM). This basically provides relational database atomicity semantics around in-memory v
by pjlegato 6y ago
The Clojure dialect of Lisp comes with a software transactional memory (STM). This basically provides relational database atomicity semantics around in-memory variable access. 99% of the pain of concurrent programming goes away.
At a high level, you provide a pure function that takes the current value. The system re-runs it as many times as needed to sort out collisions with other threads, then stores the new value -- which then becomes the argument for the pure update functions running in all the other threads.
Has anyone considered an STM for Rust?
- steveklabnik 6y agoThere have been some vague discussions, but STM is (as you mention), tough in an impure language. It is also not clear that it achieves Rust's efficiency goals.