Software Transactional Memory for OCaml
Create and use modular and composable concurrent abstractions with ease
Kcas transactions are written as ordinary functions allowing you to use all the standard control flow constructs of OCaml. Furthermore, as a starting point, traditional sequential algorithms can easily be translated to parallelism-safe transactional algorithms. Transactions can be composed sequentially, conjunctively, conditionally, and disjunctively.
Kcas comes with a companion package of parallelism-safe data structures that you can directly use for application programming. Furthermore, due to the composability of transactions and the interoperability of Kcas, independently developed data structures can be reused in new contexts.
Kcas transactions and blocking operations can await, with optional timeouts, on arbitrary conditions over the state of shared memory locations. Data structure implementations do not generally need to be a priori designed to support blocking.
Kcas is based on efficient and scalable lock-free algorithms.
Kcas is scheduler agnostic and can work with both existing and future schedulers.
Kcas: Building a Lock-Free STM for OCaml (1/2) and (2/2)
Building a lock-free STM for OCaml, see video and slides.