Control.Concurrent.Spawn
Spawn
spawn :: IO a -> IO (IO a)Source
Spawn a concurrent computation. Produces an action which demands the result. Any exception from the original computation is re-thrown when and where the result is demanded.
Spawn with try
trytype Result a = Either SomeException aSource
Two ways a computation of type can end.
IO a
spawnTry :: IO a -> IO (IO (Result a))Source
Spawn a concurrent computation. Produces an action which
demands a .
Result