Modulelifted-async-0.11.0Haskell2010
Control.Concurrent.Async.Lifted
This is a wrapped version of Control.Concurrent.Async with types generalized
from IO to all monads in either MonadBase or MonadBaseControl.
All the functions restore the monadic effects in the forked computation unless specified otherwise.
If your monad stack satisfies StM m a ~ a (e.g. the reader monad), consider
using Control.Concurrent.Async.Lifted.Safe module, which prevents you from
messing up monadic effects.
- 4 types
- 49 values
- Packagelifted-async-0.11.0
- Exports53
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceLifted.hs
Asynchronous actions
1 declarationSpawning
Generalized version of async.
Generalized version of asyncBound.
Generalized version of asyncOn.
Generalized version of asyncWithUnmask.
Generalized version of asyncOnWithUnmask.
Spawning with automatic cancelation
Generalized version of withAsync.
Generalized version of withAsyncBound.
Generalized version of withAsyncOn.
Generalized version of withAsyncWithUnmask.
Generalized version of withAsyncOnWithUnmask.
Quering Asyncs
Generalized version of wait.
Generalized version of poll.
Generalized version of waitCatch.
Generalized version of cancel.
Generalized version of uninterruptibleCancel.
Generalized version of cancelWith.
The exception thrown by cancel to terminate a thread.
Instances3Eq, Show, Exception
Eq AsyncCancelledDefined in async-2.2.5 · Control.Concurrent.Async.InternalShow AsyncCancelledDefined in async-2.2.5 · Control.Concurrent.Async.InternalException AsyncCancelledDefined in async-2.2.5 · Control.Concurrent.Async.Internal
STM operations
A version of wait that can be used inside an STM transaction.
A version of poll that can be used inside an STM transaction.
A version of waitCatch that can be used inside an STM transaction.
Waiting for multiple Asyncs
Generalized version of waitAny.
Generalized version of waitAnyCatch.
Generalized version of waitAnyCancel.
Generalized version of waitAnyCatchCancel.
Generalized version of waitEither.
Generalized version of waitEitherCatch.
Generalized version of waitEitherCancel.
Generalized version of waitEitherCatchCancel.
Generalized version of waitEither_.
NOTE: This function discards the monadic effects besides IO in the forked computation.
Generalized version of waitBoth.
Waiting for multiple Asyncs in STM
A version of waitAny that can be used inside an STM transaction.
A version of waitAnyCatch that can be used inside an STM transaction.
A version of waitEither that can be used inside an STM transaction.
A version of waitEitherCatch that can be used inside an STM transaction.
A version of waitEither_ that can be used inside an STM transaction.
A version of waitBoth that can be used inside an STM transaction.
Linking
Generalized version of link.
Generalized version of link2.
Constructors
forall a. ExceptionInLinkedThread (Async a) SomeException
Instances2Show, Exception
Show ExceptionInLinkedThreadDefined in async-2.2.5 · Control.Concurrent.Async.InternalException ExceptionInLinkedThreadDefined in async-2.2.5 · Control.Concurrent.Async.Internal
Convenient utilities
12 declarationsGeneralized version of race.
Generalized version of race_.
NOTE: This function discards the monadic effects besides IO in the forked computation.
Generalized version of concurrently.
Generalized version of concurrently_.
Generalized version of mapConcurrently.
Generalized version of mapConcurrently_.
Generalized version of forConcurrently.
Generalized version of forConcurrently_.
Generalized version of replicateConcurrently.
Generalized version of replicateConcurrently_.
Generalized version of Concurrently.
A value of type Concurrently m a is an IO-based operation that can be
composed with other Concurrently values, using the Applicative and
Alternative instances.
Calling runConcurrently on a value of type Concurrently m a will
execute the IO-based lifted operations it contains concurrently, before
delivering the result of type a.
For example
(page1, page2, page3) <- runConcurrently $ (,,)
<$> Concurrently (getURL "url1")
<*> Concurrently (getURL "url2")
<*> Concurrently (getURL "url3")
Constructors
ConcurrentlyrunConcurrently :: m a
Instances5Functor, Applicative, Alternative, Semigroup, Monoid
Functor m => Functor (Concurrently m)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.LiftedMonadBaseControl IO m => Applicative (Concurrently m)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.LiftedMonadBaseControl IO m => Alternative (Concurrently m)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted(MonadBaseControl IO m, Semigroup a) => Semigroup (Concurrently m a)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted(MonadBaseControl IO m, Semigroup a, Monoid a) => Monoid (Concurrently m a)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted
Compare two Asyncs that may have different types by their ThreadId.