on master help sign in
Fix some minor concurrency docs
b274742Harendra Kumar
src/Streamly/Data/Stream/Concurrent.hs+4−3
@@ -124,18 +124,19 @@ module Streamly.Data.Stream.Concurrent
124 -- | Stream combinators using a concurrent channel.
124 -- | Stream combinators using a concurrent channel.
125
125
126 -- *** Evaluate
126 -- *** Evaluate
127− -- | Evaluates a stream concurrently using a channel.
127+ -- | Evaluates a serial stream asynchronously using a concurency channel.
128
128
129 -- , eval
129 -- , eval
130 , parEval
130 , parEval
131
131
132 -- *** Generate
132 -- *** Generate
133− -- | Uses a single channel to evaluate mapped actions concurrently.
133+ -- | Uses a concurrency channel to evaluate multiple actions concurrently.
134 , parRepeatM
134 , parRepeatM
135 , parReplicateM
135 , parReplicateM
136
136
137 -- *** Map
137 -- *** Map
138− -- | Uses a single channel to evaluate mapped actions concurrently.
138+ -- | Uses a concurrency channel to evaluate multiple mapped actions
139+ -- concurrently.
139
140
140 -- , mapM
141 -- , mapM
141 , parMapM
142 , parMapM
src/Streamly/Internal/Data/Stream/Concurrent.hs+5−3
@@ -181,10 +181,12 @@ parEvalD modifier m = D.Stream step Nothing
181 D.Stop -> D.Stop
181 D.Stop -> D.Stop
182-}
182-}
183
183
184−-- | Evaluate a stream asynchronously using a channel and serve the consumer
184+-- | Evaluate a stream asynchronously. In a serial stream, each element of the
185+-- stream is generated as it is demanded by the consumer. `parEval` evaluates
186+-- multiple elements of the stream ahead of time and serves the results from a
185−-- from the evaluation buffer.
187+-- buffer.
186--
188--
187−-- Note that the evaluation requires a single thread as only one stream needs
189+-- Note that the evaluation requires only one thread as only one stream needs
188-- to be evaluated. Therefore, the concurrency options that are relevant to
190-- to be evaluated. Therefore, the concurrency options that are relevant to
189-- multiple streams won't apply here e.g. maxThreads, eager, interleaved,
191-- multiple streams won't apply here e.g. maxThreads, eager, interleaved,
190-- ordered, stopWhen options won't have any effect.
192-- ordered, stopWhen options won't have any effect.