async-extras-0.1.1.0: Extra Utilities for the Async Library

Safe HaskellNone

Control.Concurrent.Async.Lifted.Extra

Synopsis

Documentation

sequencePool :: (Traversable t, MonadBaseControl IO m) => Int -> t (m a) -> m (t a)Source

Implementation derived from Petr Pudlák's answer on StackOverflow http://stackoverflow.com/a/18898822/230050

mapPool :: (Traversable t, MonadBaseControl IO m) => Int -> (a -> m b) -> t a -> m (t b)Source

Implementation copied from Petr Pudlák's answer on StackOverflow http://stackoverflow.com/a/18898822/230050

fixAsync :: (MonadFix m, MonadBaseControl IO m) => (Async (StM m a) -> m a) -> m (Async (StM m a))Source

Create an Async and pass it to itself.

withParent :: MonadBaseControl IO m => Async (StM m a) -> m b -> m (Async (StM m b))Source

Create an async that is linked to a parent. If the parent dies so does this async

newtype Promise b m a Source

Promise is like Concurrently but includes a sequential monad instance

Constructors

Promise 

Fields

unPromise :: m a
 

Instances

(~ (* -> *) b IO, MonadBaseControl b m) => Monad (Promise b m) 
(~ (* -> *) b IO, Functor m) => Functor (Promise b m) 
(~ (* -> *) b IO, MonadBaseControl b m) => MonadPlus (Promise b m) 
(~ (* -> *) b IO, MonadBaseControl b m) => Applicative (Promise b m) 
(~ (* -> *) b IO, MonadBaseControl b m) => Alternative (Promise b m)