Martin Huschenbett wrote:

> 2.) What are CVars for?

Originally, `putMVar` on a full MVar was an error.  That meant that a
single MVar was not enough to implement a one-element channel.  So, a
CVar was a pair of MVars that implemented a one-element channel.  (See
the paper "Concurrent Haskell" by Peyton Jones, Gordon, and Finne.)

Now, the caller of `putMVar` pends if the MVar is full.  So, a single
MVar suffices to implement a one-element channel.  Apparently CVars have
since been removed from the Concurrent library.

Dean

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to