Created
August 28, 2018 05:03
-
-
Save matfournier/15822126d58a6090b4a4122268729655 to your computer and use it in GitHub Desktop.
desugaring help
This file contains 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