@@ -57,7 +57,7 @@ module Streamly.Core
57 , SVarStyle (..)
57 , SVarStyle (..)
58 , newEmptySVar
58 , newEmptySVar
59 , newStreamVar1
59 , newStreamVar1
60− , joinStreamVar2
60+ , joinStreamVarAsync
61 , fromStreamVar
61 , fromStreamVar
62 , toStreamVar
62 , toStreamVar
@@ -144,7 +144,7 @@ data SVarStyle =
145-- New work is enqueued either at the time of creation of the SVar or as a
145-- New work is enqueued either at the time of creation of the SVar or as a
146-- result of executing the parallel combinators i.e. '<|' and '<|>' when the
146-- result of executing the parallel combinators i.e. '<|' and '<|>' when the
147−-- already enqueued computations get evaluated. See 'joinStreamVar2'.
147+-- already enqueued computations get evaluated. See 'joinStreamVarAsync'.
149data SVar m a =
149data SVar m a =
@@ -978,9 +978,9 @@ toStreamVar sv m = do
978-- execution. When we are using parallel composition, an SVar is passed around
978-- execution. When we are using parallel composition, an SVar is passed around
979-- as a state variable. We try to schedule a new parallel computation on the
979-- as a state variable. We try to schedule a new parallel computation on the
980-- SVar passed to us. The first time, when no SVar exists, a new SVar is
980-- SVar passed to us. The first time, when no SVar exists, a new SVar is
981−-- created. Subsequently, 'joinStreamVar2' may get called when a computation
981+-- created. Subsequently, 'joinStreamVarAsync' may get called when a computation
982-- already scheduled on the SVar is further evaluated. For example, when (a
982-- already scheduled on the SVar is further evaluated. For example, when (a
983−-- `parallel` b) is evaluated it calls a 'joinStreamVar2' to put 'a' and 'b' on
983+-- `parallel` b) is evaluated it calls a 'joinStreamVarAsync' to put 'a' and 'b' on
984-- the current scheduler queue.
984-- the current scheduler queue.
986-- The 'SVarStyle' required by the current composition context is passed as one
986-- The 'SVarStyle' required by the current composition context is passed as one
@@ -1000,10 +1000,10 @@ toStreamVar sv m = do
1000-- composition and vice-versa we create a new SVar to isolate the scheduling
1000-- composition and vice-versa we create a new SVar to isolate the scheduling
1001-- of the two.
1001-- of the two.
1003−{-# INLINE joinStreamVar2 #-}
1003+{-# INLINE joinStreamVarAsync #-}
1004−joinStreamVar2 :: MonadAsync m
1004+joinStreamVarAsync :: MonadAsync m
1005 => SVarStyle -> Stream m a -> Stream m a -> Stream m a
1005 => SVarStyle -> Stream m a -> Stream m a -> Stream m a
1006−joinStreamVar2 style m1 m2 = Stream $ \svr stp sng yld ->
1006+joinStreamVarAsync style m1 m2 = Stream $ \svr stp sng yld ->
1007 case svr of
1007 case svr of
1008 Just sv | svarStyle sv == style ->
1008 Just sv | svarStyle sv == style ->
1009 liftIO ((enqueue sv) m2) >> (runStream m1) svr stp sng yld
1009 liftIO ((enqueue sv) m2) >> (runStream m1) svr stp sng yld
@@ -1052,11 +1052,11 @@ ahead m1 m2 = Stream $ \svr stp sng yld -> do
1053{-# INLINE async #-}
1053{-# INLINE async #-}
1054async :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
1054async :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
1055−async = joinStreamVar2 AsyncVar
1055+async = joinStreamVarAsync AsyncVar
1057{-# INLINE wAsync #-}
1057{-# INLINE wAsync #-}
1058wAsync :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
1058wAsync :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
1059−wAsync = joinStreamVar2 WAsyncVar
1059+wAsync = joinStreamVarAsync WAsyncVar
1061{-# INLINE parallel #-}
1061{-# INLINE parallel #-}
1062parallel :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
1062parallel :: MonadAsync m => Stream m a -> Stream m a -> Stream m a