Fast lock-free thread-safe mutable data structures (eg ConcurentLinkedQueue) have been written in languages like Java (and apparently even C++ but I’m less familiar).
Also, STM isn’t necessarily much better than locks in practice eg quick Googled example: http://nbronson.github.io/scala-stm/benchmark.html (Don’t know how the Haskell equivalent compares)
(where “medium” granularity locks were just as good perf. wise and STM’s GC pressure was higher)
Fast lock-free thread-safe mutable data structures (eg ConcurentLinkedQueue) have been written in languages like Java (and apparently even C++ but I’m less familiar).
Also, STM isn’t necessarily much better than locks in practice eg quick Googled example: http://nbronson.github.io/scala-stm/benchmark.html (Don’t know how the Haskell equivalent compares)
(where “medium” granularity locks were just as good perf. wise and STM’s GC pressure was higher)