mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-10-06 21:27:35 +03:00
Export the async API
This commit is contained in:
parent
50e16043f8
commit
e75a12d4fa
@ -126,6 +126,7 @@ module Asyncly
|
||||
-- * Running
|
||||
, runAsyncly
|
||||
, toList
|
||||
, async
|
||||
|
||||
-- * Monadic Composition (Conjunction)
|
||||
-- $bind
|
||||
|
@ -22,8 +22,11 @@ module Asyncly.AsyncT
|
||||
, MonadAsync
|
||||
, runAsyncly
|
||||
, toList
|
||||
, async
|
||||
|
||||
, take
|
||||
, drop
|
||||
|
||||
, zipWithM
|
||||
, zipWith
|
||||
, ZipSerial (..)
|
||||
@ -768,6 +771,9 @@ pushOneToCtx ctype m = do
|
||||
pushWorker ctx
|
||||
return ctx
|
||||
|
||||
-- | Run a computation asynchronously, triggers the computation and returns
|
||||
-- another computation (i.e. a promise) that when run produces the output from
|
||||
-- the original computation.
|
||||
async :: MonadAsync m => AsyncT m a -> m (AsyncT m a)
|
||||
async m = do
|
||||
ctx <- pushOneToCtx (CtxType Disjunction LIFO) m
|
||||
|
Loading…
Reference in New Issue
Block a user