So when should I use a STM TChan instead of a regular Chan?
On Oct 31, 2005, at 10:08 PM, ChrisK wrote:
Or perhaps a TChan, if that is more appropriate:
http://www.haskell.org/ghc/docs/latest/html/libraries/stm/Control-
Concurrent-STM-TChan.html
I like the curried command idiom:
I'm not sure I understand this. Are you trying to show that the same
logToParent approach can be used with Chan, TChan and MVar below?
do chan <- newChan
let logToParent = writeChan chan
do tChan <- newTChan
let logToParentSTM = writeTChan tChan
let logToParent = atomically.logToParentSTM
do mVar <- newEmptyMVar
let logToParent = putMVar mVar
Thanks, Joel
--
http://wagerlabs.com/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe