Skip to content

TChan documentation newBroadcastTChan example#27

Closed
mhitza wants to merge 2 commits intohaskell:masterfrom
mhitza:patch-1
Closed

TChan documentation newBroadcastTChan example#27
mhitza wants to merge 2 commits intohaskell:masterfrom
mhitza:patch-1

Conversation

@mhitza
Copy link

@mhitza mhitza commented Apr 23, 2020

Current example currently does not work as dupTChan runs inside the STM monad, not IO

mhitza added 2 commits April 23, 2020 20:22
Current example currently does not work as dupTChan runs inside the STM monad, not IO
atomically call is required for readTChan
@zoranbosnjak
Copy link

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.

@zoranbosnjak
Copy link

Sorry, I did not see the second commit.

Copy link

@haskellGardener haskellGardener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this in the Haddocks recently. This fix is correct.

@mhitza mhitza closed this by deleting the head repository Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants