Skip to content

Instantly share code, notes, and snippets.

@michaelt michaelt/race.hs
Created Dec 5, 2016

Embed
What would you like to do?
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (race)
import Control.Monad
marika = forever $ do
threadDelay (10^6)
putStrLn "Marika Boo!!!"
s = do
c <- getChar
case c of
's' -> return ()
_ -> s
main = do
s
race marika s
return ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.