[Haskell-cafe] Misleading MVar documentation

Jan-Willem Maessen jmaessen at alum.mit.edu
Sun Jan 16 04:58:35 CET 2011


On Wed, Jan 12, 2011 at 11:23 AM, Neil Brown <nccb2 at kent.ac.uk> wrote:
> On 12/01/11 15:53, Edward Z. Yang wrote:
>>
>> These are interesting, opposed perspectives, and I suspect what would be
>> good is to treat both situations.  I think perhaps what would be good
>> to put in the introduction is the conceptual model of MVars: that is,
>> take and put are the fundamental operations, and everything else is
>> composed of them.  With additional constraints on who is writing and
>> reading
>> MVars, you can assume more safety properties, but you have to ensure
>> that those are indeed held (or you should use STM instead.)
>>
>> I'll try another writeup. Does anyone know where the original papers for
>> MVars might be?
>>
> I think the original paper is "Concurrent Haskell", available here:
>
> http://www.haskell.org/ghc/docs/papers/concurrent-haskell.ps.gz
>
> and here:
>
> http://research.microsoft.com/en-us/um/people/simonpj/papers/concurrent-haskell.ps.gz

Actually, the first presentation of M-structures is rather older than
that.  See Barth, Nikhil, and Arvind's FPCA '91 paper:
http://portal.acm.org/citation.cfm?id=652538

The original formulation was indeed in terms of "take" and "put",
though unconditional read and write primitives were prtty commonly
used in Id programs.  The take/put view can also usefully be thought
of as a 1-element blocking channel.

-Jan-Willem MAessen

>
> Thanks,
>
> Neil.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list