Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Polysemy.Async
- module Polysemy.Final
- runAsyncFinal :: Member (Final IO) r => Sem (Async ': r) a -> Sem r a
Documentation
module Polysemy.Async
module Polysemy.Final
runAsyncFinal :: Member (Final IO) r => Sem (Async ': r) a -> Sem r a Source #
Run an Async
effect through final IO
This can be used as an alternative to runAsyncInIO
.
Beware: Effects that aren't interpreted in terms of IO
will have local state semantics in regards to Async
effects
interpreted this way. See interpretFinal
.
Notably, unlike runAsync
, this is not consistent with
State
unless runStateInIORef
is used.
State that seems like it should be threaded globally throughout the Async
will not be.
Prefer runAsync
unless its unsafe or inefficient in the context of your
application.