forkOnIO

forkOnIO :: Int -> IO () -> IO ThreadId
base GHC.Conc.Sync, base GHC.Conc
Like forkIO, but lets you specify on which CPU the thread is created. Unlike a forkIO thread, a thread created by forkOnIO will stay on the same CPU for its entire lifetime (forkIO threads can migrate between CPUs according to the scheduling policy). forkOnIO is useful for overriding the scheduling policy when you know in advance how best to distribute the threads. The Int argument specifies the CPU number; it is interpreted modulo numCapabilities (note that it actually specifies a capability number rather than a CPU number, but to a first approximation the two are equivalent).
forkOnIOUnmasked :: Int -> IO () -> IO ThreadId
base GHC.Conc.Sync, base GHC.Conc
Like forkOnIO, but the child thread is created with asynchronous exceptions unmasked (see Control.Exception.mask).