Created
April 26, 2015 13:27
-
-
Save bohde/8edceabdb85f0231c9b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program :: MVarM () | |
program = do | |
chan <- newSkipChan :: MVarM (SkipChan Int) | |
fork $ void $ getSkipChan chan | |
mapM_ (putSkipChan chan) [0..10] | |
-- "new mvar" | |
-- "new mvar" | |
-- "write to mvar" | |
-- "fork" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "read mvar" | |
-- "blocked on read" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "blocked on read" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" | |
-- "read mvar" | |
-- "write to mvar" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment