Re: [Haskell-cafe] Does the TMVar and TChan really obey STM rules?

2009-12-26 Thread Andrey Sisoyev
Thank you, Svein Ove Aas and Neil Brown, for your replies ! I really should have checked the stm sources before panicking here! =) Regards, Andrey -- View this message in context: http://old.nabble.com/Does-the-TMVar-and-TChan-really-obey-STM-rules--tp26914707p26927805.html Sent from the

[Haskell-cafe] Does the TMVar and TChan really obey STM rules?

2009-12-24 Thread Andrey Sisoyev
Hi everyone, isEmptyTMVar :: TMVar a - STM BoolSource Check whether a given TMVar is empty. Notice that the boolean value returned is just a snapshot of the state of the TMVar. By the time you get to react on its result, the TMVar may have been filled (or emptied) - so be extremely

Re: [Haskell-cafe] Does the TMVar and TChan really obey STM rules?

2009-12-24 Thread Neil Brown
Andrey Sisoyev wrote: Hi everyone, isEmptyTMVar :: TMVar a - STM Bool Source Check whether a given TMVar is empty. Notice that the boolean value returned is just a snapshot of the state of the TMVar. By the time you get to react on its result, the TMVar may have been filled (or

Re: [Haskell-cafe] Does the TMVar and TChan really obey STM rules?

2009-12-24 Thread Svein Ove Aas
On Thu, Dec 24, 2009 at 4:03 PM, Andrey Sisoyev andrejs.sisoj...@nextmail.ru wrote: Hi everyone, isEmptyTMVar :: TMVar a - STM Bool    Source Check whether a given TMVar is empty. Notice that the boolean value returned is just a snapshot of the state of the TMVar. By the time you get to react