-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Asynchronous Computations -- -- An implementation of IO computations that return their value -- asynchronously. @package async @version 1.4 -- | An implementation of IO computations that return their value -- asynchronously. module Control.Async -- | Async a represents a value a that is being computed -- asynchronously, i.e. a value that is going to become available at some -- point in the future. data Async a -- | Start an asynchronous computation. forkAsync :: IO a -> IO (Async a) -- | Throw an asynchronous exception to the thread that performs the -- computation associated with this value. throwToAsync :: Exception e => Async a -> e -> IO () -- | Abort the asynchronous computation associated with this value. killAsync :: Async a -> IO () -- | Test whether the asynchronous value has become available. isReadyAsync :: Async a -> IO Bool -- | Wait for the asynchronous value to become available, and retrieve it. -- If the computation that generated the value has thrown an exception, -- then that exception will be raised here. waitForAsync :: Async a -> IO a -- | Run both computations in parallel and return the a value of -- the computation that terminates first. An exception in either of the -- two computations aborts the entire parIO computation. parIO :: IO a -> IO a -> IO a