Modulelifted-async-0.11.0Haskell2010
Control.Concurrent.Async.Lifted.Safe
This is a safe variant of Control.Concurrent.Async.Lifted.
This module assumes your monad stack to satisfy StM m a ~ a so you can't
mess up monadic effects. If your monad stack is stateful, use
Control.Concurrent.Async.Lifted with special care.
- 4 types
- 2 classes
- 49 values
- Packagelifted-async-0.11.0
- Exports55
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceSafe.hs
Asynchronous actions
3 declarationsInstances1Forall
(forall (a :: k). p a) => Forall pDefined in constraints-0.14.2 · Data.Constraint.Forall
Spawning
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_
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_.
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
Concurrently :: Forall (Pure m) => m a -> Concurrently m arunConcurrently :: m a
Instances5Functor, Applicative, Alternative, Semigroup, Monoid
Functor m => Functor (Concurrently m)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted.Safe(MonadBaseControl IO m, Forall (Pure m)) => Applicative (Concurrently m)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted.Safe(MonadBaseControl IO m, Forall (Pure m)) => Alternative (Concurrently m)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted.Safe(MonadBaseControl IO m, Semigroup a, Forall (Pure m)) => Semigroup (Concurrently m a)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted.Safe(MonadBaseControl IO m, Semigroup a, Monoid a, Forall (Pure m)) => Monoid (Concurrently m a)Defined in lifted-async-0.11.0 · Control.Concurrent.Async.Lifted.Safe
Compare two Asyncs that may have different types by their ThreadId.