stm
stm copied to clipboard
TChan documentation newBroadcastTChan example
Current example currently does not work as dupTChan runs inside the STM monad, not IO
I've just noticed the same problem in the example. The proposed PR is not complete. readTChan in the same example is also STM (not IO) so it needs atomically $ ... too.
Sorry, I did not see the second commit.