Skip to content

Instantly share code, notes, and snippets.

@LeifWarner
Created July 6, 2013 17:55
Show Gist options
  • Save LeifWarner/5940676 to your computer and use it in GitHub Desktop.
Save LeifWarner/5940676 to your computer and use it in GitHub Desktop.
Run two IO actions concurrently. Seems to run the second one first, for me.
{-# OPTIONS_GHC -F -pgmF she #-}
import Control.Applicative
import Control.Concurrent.Async
action = (| Concurrently getLine ++ Concurrently getLine |)
main = putStrLn =<< runConcurrently action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment