
I posted this on comp.lang.functional and someone suggested I try here. Apologies if it's not on-charter here - any redirections appreciated.
I'm seeing unexpected behaviour from GHC 5. (unexpected by me, anyway :)
Hi Greg, As it happens I saw your post on comp.lang.functional and we fixed the bug last week :-) (I replied to the newsgroup, but our news is a bit flaky here so you may not have seen it). Yes, you found a genuine bug in take/putMVar that appeared when the semantics of putMVar changed to allow it to block when the MVar is full. To work around the problem, don't rely on this behaviour of putMVar and either use one of the other Concurrent Haskell datatypes (eg. Chan) or use a second MVar to act as a "lock" on the first one. Cheers, Simon
participants (1)
-
Simon Marlow