[Haskell-cafe] Misleading MVar documentation

Jason Dagit dagit at codersbase.com
Sat Dec 25 03:32:45 CET 2010


On Fri, Dec 24, 2010 at 5:32 PM, Edward Z. Yang <ezyang at mit.edu> wrote:

> Merry Christmas all!
>
> Is it just me, or does the Control.Concurrent.MVar documentation seem a bit
> misleading?  In particular, we should explicitly note the race conditions
> for not just swapMVar but also readMVar, withMVar, modifyMVar_ and
> modifyMVar,
> and clarify that the safety guarantees of the latter three pertain to their
> handling of asynchronous exceptions.
>
> It might also be good to tell people that if they need race-free operations
> of this style, STM is a good alternative to look at, even if only one
> variable
> is being synchronized over.
>

This reminds me, I recall someone showing me some runtimes that implied for
nearly all programs TVars had better performance than MVars.  I can't find
those results on google.

I did find this thread:
http://www.mail-archive.com/haskell-cafe@haskell.org/msg50734.html

The links in Don's mail are broken.  It seems that Simon Marlow's paper
directory didn't survive the server transition:
http://www.haskell.org/~simonmar/papers/

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20101224/c29d8e31/attachment.htm>


More information about the Haskell-Cafe mailing list