on master help sign in
Rename evalWith to parEval in the concurrent Fold module
commitbc1f936e4c9c060adc6e4da8d58d35dba9ee47fa authorHarendra Kumar <harendra@composewell.com> dateTue 3 Jan 2023, 11:40 (4 years ago) parenteb7da51
2 files changed+8−8
src/Streamly/Internal/Data/Fold/Concurrent.hs+3−3 src/Streamly/Internal/Data/Fold/Concurrent/Channel.hs+5−5
src/Streamly/Internal/Data/Fold/Concurrent.hs+3−3
@@ -30,7 +30,7 @@ module Streamly.Internal.Data.Fold.Concurrent
3030 -- | Stream combinators using Async channel
3131
3232 , eval
33− , evalWith
33+ , parEval
3434 )
3535where
3636
@@ -62,8 +62,8 @@ import Streamly.Internal.Data.Fold.Concurrent.Channel
6262-- | Evaluate a stream asynchronously using a channel and serve the consumer
6363-- from the evaluation buffer.
6464--
65−-- >>> eval = Fold.evalWith id
65+-- >>> eval = Fold.parEval id
6666--
6767{-# INLINE eval #-}
6868eval :: MonadAsync m => Fold m a b -> Fold m a b
69−eval = evalWith id
69+eval = parEval id
src/Streamly/Internal/Data/Fold/Concurrent/Channel.hs+5−5
@@ -17,7 +17,7 @@ module Streamly.Internal.Data.Fold.Concurrent.Channel
1717 , inspect
1818
1919 -- * Fold operations
20− , evalWith
20+ , parEval
2121 )
2222where
2323
@@ -42,9 +42,9 @@ import Streamly.Internal.Data.Stream.Channel.Types
4242-- | Evaluate the fold asynchronously in a worker thread separate from the
4343-- driver thread.
4444--
45−{-# INLINABLE evalWith #-}
46−evalWith :: MonadAsync m => (Config -> Config) -> Fold m a b -> Fold m a b
47−evalWith modifier f =
45+{-# INLINABLE parEval #-}
46+parEval :: MonadAsync m => (Config -> Config) -> Fold m a b -> Fold m a b
47+parEval modifier f =
4848 Fold step initial extract
4949
5050 where
@@ -79,7 +79,7 @@ evalWith modifier f =
7979 $ withDiagMVar
8080 (svarInspectMode chan)
8181 (dumpSVar chan)
82− "evalWith: waiting to drain"
82+ "parEval: waiting to drain"
8383 $ takeMVar (outputDoorBellFromConsumer chan)
8484 -- XXX remove recursion
8585 extract chan