@@ -57,7 +57,7 @@ module Streamly.Core
5757 , SVarStyle (..)
5858 , newEmptySVar
5959 , newStreamVar1
60− , joinStreamVar2
60+ , joinStreamVarAsync
6161 , fromStreamVar
6262 , toStreamVar
6363 )
@@ -144,7 +144,7 @@ data SVarStyle =
144144--
145145-- New work is enqueued either at the time of creation of the SVar or as a
146146-- 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'.
148148--
149149data SVar m a =
150150 SVar {
@@ -978,9 +978,9 @@ toStreamVar sv m = do
978978-- execution. When we are using parallel composition, an SVar is passed around
979979-- as a state variable. We try to schedule a new parallel computation on the
980980-- 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
982982-- 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
984984-- the current scheduler queue.
985985--
986986-- The 'SVarStyle' required by the current composition context is passed as one
@@ -1000,10 +1000,10 @@ toStreamVar sv m = do
10001000-- composition and vice-versa we create a new SVar to isolate the scheduling
10011001-- of the two.
10021002--
1003−{-# INLINE joinStreamVar2 #-}
1004−joinStreamVar2 :: MonadAsync m
1003+{-# INLINE joinStreamVarAsync #-}
1004+joinStreamVarAsync :: MonadAsync m
10051005 => 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 ->
10071007 case svr of
10081008 Just sv | svarStyle sv == style ->
10091009 liftIO ((enqueue sv) m2) >> (runStream m1) svr stp sng yld
@@ -1052,11 +1052,11 @@ ahead m1 m2 = Stream $ \svr stp sng yld -> do
10521052
10531053{-# INLINE async #-}
10541054async :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
1055−async = joinStreamVar2 AsyncVar
1055+async = joinStreamVarAsync AsyncVar
10561056
10571057{-# INLINE wAsync #-}
10581058wAsync :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
1059−wAsync = joinStreamVar2 WAsyncVar
1059+wAsync = joinStreamVarAsync WAsyncVar
10601060
10611061{-# INLINE parallel #-}
10621062parallel :: MonadAsync m => Stream m a -> Stream m a -> Stream m a