[Haskell-cafe] Misleading MVar documentation
Mitar
mmitar at gmail.com
Sat Dec 25 15:06:59 CET 2010
Hi!
On Sat, Dec 25, 2010 at 11:58 AM, Edward Z. Yang <ezyang at mit.edu> wrote:
> I think you're right. A further comment is that you don't really need
> stringent timing conditions (which is the only thing I think of when
> I hear "race") to see another thread "grab" the mvar underneath
> you
Yes, MVars are (bounded, 1 space long) queues with predictable behavior.
Maybe we should change documentation for swapMVar (and others) and
replace notion of race condition with that it can block.
This would be also in accordance with functions I proposed. So current
functions are blocking (and we document that) and we introduce
non-blocking versions.
Mitar
More information about the Haskell-Cafe
mailing list