Created
August 28, 2018 05:03
-
-
Save matfournier/c14da949f012743a433432da7ec35785 to your computer and use it in GitHub Desktop.
desugaring help
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
main = do | |
m <- newEmptyMVar | |
forkIO $ do | |
putMVar m 'x' -- child thread puts x into the mvar | |
putMVar m 'y' | |
r <- takeMVar m -- main thread takes the value out of the mvar | |
print r | |
r <- takeMVar m | |
print r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment