On Thu, Jun 11, 2009 at 2:30 AM, Ketil Malde <span dir="ltr">&lt;<a href="mailto:ketil@malde.org">ketil@malde.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
<br>
Browsing LWN, I ran across this comment:<br>
<br>
<a href="http://lwn.net/Articles/336039/" target="_blank">http://lwn.net/Articles/336039/</a><br>
<br>
The author makes a bunch of unsubstantiated claims about STM, namely<br>
that all implementations use locking under the hood, and that STM can<br>
live- and deadlock.  I&#39;ve seen a lot of similar sentiments in other<br>
places as well (comp.arch springs to mind).<br>
<br>
Now, I&#39;m no expert on STM, but I was pretty sure these are incorrect,<br>
and I certainly had the impression that Haskell&#39;s STM guarantees some<br>
progress - which it couldn&#39;t in a deadlock situation.</blockquote><div><br>MVars can be simulated with STM, and MVars can semantically get in a deadlock situation, so STM can also deadlock.<br><br>Admittedly, if you&#39;re using STM to simulate MVars, you&#39;re doing it wrong.<br>
<br>Luke</div></div><br>