[Haskell-cafe] Software Transactional Memory and LWN

Luke Palmer lrpalmer at gmail.com
Thu Jun 11 04:35:33 EDT 2009

On Thu, Jun 11, 2009 at 2:30 AM, Ketil Malde <ketil at malde.org> wrote:

> Hi,
> Browsing LWN, I ran across this comment:
> http://lwn.net/Articles/336039/
> The author makes a bunch of unsubstantiated claims about STM, namely
> that all implementations use locking under the hood, and that STM can
> live- and deadlock.  I've seen a lot of similar sentiments in other
> places as well (comp.arch springs to mind).
> Now, I'm no expert on STM, but I was pretty sure these are incorrect,
> and I certainly had the impression that Haskell's STM guarantees some
> progress - which it couldn't in a deadlock situation.

MVars can be simulated with STM, and MVars can semantically get in a
deadlock situation, so STM can also deadlock.

Admittedly, if you're using STM to simulate MVars, you're doing it wrong.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090611/fee66019/attachment.html

More information about the Haskell-Cafe mailing list