> If the answer is STM, please show me some non-trivial application that
> uses it, preferably
> in an impure language.
yes, that would be interesting to see. presumably the example would
have to come from Haskell, Clojure, or classically some SQL database?
i am under the impression that STM is harder to optimize since
generally you don't know what the transactions collided on. whereas
with a "hot lock" you can see precisely what code uses that lock and
what it locks.