-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Tiny library for joinable computations / threads with results.
--
-- Spawn a concurrent IO computation and later demand its result.
-- Tiny API and implementation.
@package spawn
@version 0.2
module Control.Concurrent.Spawn
-- | 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 :: IO a -> IO (IO a)
-- | Two ways a computation of type IO a can end.
type Result a = Either SomeException a
-- | Spawn a concurrent computation. Produces an action which demands a
-- Result.
spawnTry :: IO a -> IO (IO (Result a))
-- | Given n, produces a function to wrap IO
-- actions. No more than n wrapped actions will be in progress at
-- one time.
pool :: Int -> IO (IO a -> IO a)