on master help sign in
Consolidate Stream.Concurrent.* modules
commit6e89ebbdf2b977ccd3876db9980b32102d310eea authorHarendra Kumar <harendra@composewell.com> dateMon 27 Nov 2023, 02:57 (3 years ago) parent3ea7bf2
3 files changed+29−39
src/Streamly/Internal/Data/Stream/Concurrent.hs+3−19 src/Streamly/Internal/Data/Stream/Concurrent/Channel.hs+15−12 streamly.cabal+11−8
src/Streamly/Internal/Data/Stream/Concurrent.hs+3−19
@@ -21,26 +21,10 @@ module Streamly.Internal.Data.Stream.Concurrent
2121 -- * Imports
2222 -- $setup
2323
24+ module Streamly.Internal.Data.Stream.Concurrent.Channel
25+
2426 -- * Types
25− MonadAsync
26−
27− -- * Configuration
28− , Config
29− , maxThreads
30− , maxBuffer
31− , eager
32− , StopWhen (..)
33− , stopWhen
34− , ordered
35− , interleaved
36− -- maxYields
37− , Rate(..)
38− , rate
39− , avgRate
40− , minRate
41− , maxRate
42− , constRate
43− , inspect
27+ , MonadAsync
4428
4529 -- * Combinators
4630 -- | Stream combinators using a concurrent channel
src/Streamly/Internal/Data/Stream/Concurrent/Channel.hs+15−12
@@ -8,15 +8,18 @@
88
99module Streamly.Internal.Data.Stream.Concurrent.Channel
1010 (
11+ module Streamly.Internal.Data.Stream.Concurrent.Channel.Type
12+ , module Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
13+ , module Streamly.Internal.Data.Stream.Concurrent.Channel.Append
14+ , module Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
15+ , module Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
16+ , module Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
17+
1118 -- * Channel
12− Channel (..)
19+ , Channel (..)
1320 , newChannel
1421 , withChannel
1522 , withChannelK
16− , fromChannel
17− , toChannel
18− , toChannelK
19− , stopChannel
2023 -- quiesceChannel -- wait for running tasks but do not schedule any more.
2124
2225 -- * Configuration
@@ -52,18 +55,18 @@ where
5255
5356import Streamly.Internal.Control.Concurrent (MonadAsync)
5457import Streamly.Internal.Data.Stream (Stream)
55−import Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
56− (fromChannel, fromChannelK, toChannel, toChannelK)
57−import Streamly.Internal.Data.Stream.Concurrent.Channel.Append
58− (newAppendChannel)
59−import Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
60− (newInterleaveChannel)
6158
6259import qualified Streamly.Internal.Data.StreamK as K
6360
64−import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
6561import Streamly.Internal.Data.Channel.Types
6662
63+import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
64+import Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
65+import Streamly.Internal.Data.Stream.Concurrent.Channel.Append
66+import Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
67+import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
68+import Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
69+
6770-- | Create a new concurrent stream evaluation channel. The monad
6871-- state used to run the stream actions is captured from the call site of
6972-- newChannel.
streamly.cabal+11−8
@@ -375,13 +375,6 @@ library
375375 , Streamly.Internal.Data.Unfold.Prelude
376376 , Streamly.Internal.Data.Fold.Prelude
377377
378− , Streamly.Internal.Data.Stream.Concurrent.Channel.Type
379− , Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
380− , Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
381− , Streamly.Internal.Data.Stream.Concurrent.Channel.Append
382− , Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
383− , Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
384− , Streamly.Internal.Data.Stream.Concurrent.Channel
385378 , Streamly.Internal.Data.Stream.Concurrent
386379 , Streamly.Internal.Data.Stream.Zip.Concurrent
387380 , Streamly.Internal.Data.Stream.Time
@@ -457,7 +450,14 @@ library
457450 , Streamly.Data.Stream.Concurrent
458451 , Streamly.Data.Stream.Time
459452
460− , Streamly.Internal.Data.Fold.SVar
453+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Type
454+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
455+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
456+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Append
457+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
458+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
459+ , Streamly.Internal.Data.Stream.Concurrent.Channel
460+
461461 , Streamly.Internal.Data.Fold.Async
462462 , Streamly.Internal.Data.Fold.Concurrent.Channel.Type
463463 , Streamly.Internal.Data.Fold.Concurrent.Channel
@@ -466,6 +466,7 @@ library
466466 , Streamly.Internal.Data.Unfold.Exception
467467 , Streamly.Internal.Data.Unfold.SVar
468468
469+ -- Deprecated
469470 , Streamly.Internal.Data.Stream.Common
470471 , Streamly.Internal.Data.Stream.IsStream.Type
471472 , Streamly.Internal.Data.Stream.IsStream.Generate
@@ -483,6 +484,8 @@ library
483484 , Streamly.Internal.Data.Stream.SVar.Generate
484485 , Streamly.Internal.Data.Stream.SVar.Eliminate
485486
487+ , Streamly.Internal.Data.Fold.SVar
488+
486489 , Streamly.Internal.Data.SVar.Worker
487490 , Streamly.Internal.Data.SVar.Dispatch
488491 , Streamly.Internal.Data.SVar.Pull