Skip to content

Instantly share code, notes, and snippets.

@NathanHowell
Created August 10, 2013 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NathanHowell/6201986 to your computer and use it in GitHub Desktop.
Save NathanHowell/6201986 to your computer and use it in GitHub Desktop.
Passing a threadID to a thread
import Control.Concurrent
import System.IO
t :: ThreadId -> IO ()
t tid = print ("mah thread", tid)
main :: IO ()
main = do
_tid <- fixIO (forkIO . t)
threadDelay 100000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment