Safe Haskell | None |
---|---|
Language | Haskell2010 |
- sequencePool :: (Traversable t, MonadBaseControl IO m) => Int -> t (m a) -> m (t a)
- mapPool :: (Traversable t, MonadBaseControl IO m) => Int -> (a -> m b) -> t a -> m (t b)
- sequenceConcurrently :: (Traversable t, MonadBaseControl IO m) => t (m a) -> m (t a)
- forConcurrently_ :: (Foldable t, MonadBaseControl IO m) => t a -> (a -> m b) -> m ()
- fixAsync :: (MonadFix m, MonadBaseControl IO m) => (Async (StM m a) -> m a) -> m (Async (StM m a))
- fixAsyncBound :: (MonadFix m, MonadBaseControl IO m) => (Async (StM m a) -> m a) -> m (Async (StM m a))
- fixAsyncOn :: (MonadFix m, MonadBaseControl IO m) => Int -> (Async (StM m a) -> m a) -> m (Async (StM m a))
- fixAsyncWithUnmask :: (MonadFix m, MonadBaseControl IO m) => (Async (StM m a) -> (forall b. m b -> m b) -> m a) -> m (Async (StM m a))
- fixAsyncOnWithUnmask :: (MonadFix m, MonadBaseControl IO m) => Int -> (Async (StM m a) -> (forall b. m b -> m b) -> m a) -> m (Async (StM m a))
- withParent :: MonadBaseControl IO m => Async a -> m b -> m (Async (StM m b))
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
sequenceConcurrently :: (Traversable t, MonadBaseControl IO m) => t (m a) -> m (t a) Source #
forConcurrently_ :: (Foldable t, MonadBaseControl IO m) => t a -> (a -> m b) -> m () Source #
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.
fixAsyncBound :: (MonadFix m, MonadBaseControl IO m) => (Async (StM m a) -> m a) -> m (Async (StM m a)) Source #
fixAsyncOn :: (MonadFix m, MonadBaseControl IO m) => Int -> (Async (StM m a) -> m a) -> m (Async (StM m a)) Source #
fixAsyncWithUnmask :: (MonadFix m, MonadBaseControl IO m) => (Async (StM m a) -> (forall b. m b -> m b) -> m a) -> m (Async (StM m a)) Source #
Like fixAsync
but using forkIOWithUnmask
internally.
The child thread is passed a function that can be used to unmask asynchronous exceptions.
fixAsyncOnWithUnmask :: (MonadFix m, MonadBaseControl IO m) => Int -> (Async (StM m a) -> (forall b. m b -> m b) -> m a) -> m (Async (StM m a)) Source #
Like fixAsyncOn
but using forkOnWithUnmask
internally.
The child thread is passed a function that can be used to unmask asynchronous exceptions.
withParent :: MonadBaseControl IO m => Async 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