@@ -17,8 +17,9 @@
18module Streamly.Data.Stream.Concurrent
18module Streamly.Data.Stream.Concurrent
21 -- $concurrency
20 -- $concurrency
22 MonadAsync
23 MonadAsync
24 -- ** Configuration
25 -- ** Configuration
@@ -110,7 +111,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
111-- $concurrency
112-- $concurrency
113−-- == Concurrency Channels
114+-- == Channels
115-- At a lower level, concurrency is implemented using channels that support
116-- At a lower level, concurrency is implemented using channels that support
116-- concurrent evaluation of streams. We create a channel, and add one or more
117-- concurrent evaluation of streams. We create a channel, and add one or more
@@ -118,7 +119,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
118-- generates a single output stream from the results. How the streams are
119-- generates a single output stream from the results. How the streams are
119-- combined depends on the configuration of the channel.
120-- combined depends on the configuration of the channel.
121−-- == Concurrency Primitives
122+-- == Primitives
123-- There are only a few fundamental abstractions for concurrency, 'parEval',
124-- There are only a few fundamental abstractions for concurrency, 'parEval',
124-- 'parConcatMap', and 'parConcatIterate', all concurrency combinators can be
125-- 'parConcatMap', and 'parConcatIterate', all concurrency combinators can be
@@ -139,7 +140,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
139-- function recursively over the stream. This can be used to traverse trees or
140-- function recursively over the stream. This can be used to traverse trees or
140-- graphs.
141-- graphs.
142−-- == Concurrency Configuration
143+-- == Configuration
144-- Concurrent combinators take a 'Config' argument which controls the
145-- Concurrent combinators take a 'Config' argument which controls the
145-- concurrent behavior. For example, maximum number of threads to be used
146-- concurrent behavior. For example, maximum number of threads to be used
@@ -158,7 +159,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
158-- documentation for the default behavior and default values of configuration
159-- documentation for the default behavior and default values of configuration
159-- parameters.
160-- parameters.
161−-- == Scheduling behavior
162+-- == Scheduling
163-- The most important configuration option is to control whether the output of
164-- The most important configuration option is to control whether the output of
164-- the concurrent execution is consumed in the same order as the corresponding
165-- the concurrent execution is consumed in the same order as the corresponding
@@ -174,7 +175,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
174-- if the stream consumer thread blocks it does not make any impact on the
175-- if the stream consumer thread blocks it does not make any impact on the
175-- scheduling of the available tasks.
176-- scheduling of the available tasks.
177−-- == Concurrent Combinators
178+-- == Combinators
179-- Using the few fundamental concurrency primitives we can implement all the
180-- Using the few fundamental concurrency primitives we can implement all the
180-- usual streaming combinators with concurrent behavior. Combinators like
181-- usual streaming combinators with concurrent behavior. Combinators like