
21 Jan
2003
21 Jan
'03
2:29 p.m.
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