on master help sign in
Consolidate Stream.Concurrent.* modules
6e89ebbHarendra Kumar
src/Streamly/Internal/Data/Stream/Concurrent.hs+3−19
@@ -21,26 +21,10 @@ module Streamly.Internal.Data.Stream.Concurrent
21 -- * Imports
21 -- * Imports
22 -- $setup
22 -- $setup
23
23
24+ module Streamly.Internal.Data.Stream.Concurrent.Channel
25+
24 -- * Types
26 -- * Types
25− MonadAsync
27+ , 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
44
28
45 -- * Combinators
29 -- * Combinators
46 -- | Stream combinators using a concurrent channel
30 -- | Stream combinators using a concurrent channel
src/Streamly/Internal/Data/Stream/Concurrent/Channel.hs+15−12
@@ -8,15 +8,18 @@
8
8
9module Streamly.Internal.Data.Stream.Concurrent.Channel
9module Streamly.Internal.Data.Stream.Concurrent.Channel
10 (
10 (
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+
11 -- * Channel
18 -- * Channel
12− Channel (..)
19+ , Channel (..)
13 , newChannel
20 , newChannel
14 , withChannel
21 , withChannel
15 , withChannelK
22 , withChannelK
16− , fromChannel
17− , toChannel
18− , toChannelK
19− , stopChannel
20 -- quiesceChannel -- wait for running tasks but do not schedule any more.
23 -- quiesceChannel -- wait for running tasks but do not schedule any more.
21
24
22 -- * Configuration
25 -- * Configuration
@@ -52,18 +55,18 @@ where
52
55
53import Streamly.Internal.Control.Concurrent (MonadAsync)
56import Streamly.Internal.Control.Concurrent (MonadAsync)
54import Streamly.Internal.Data.Stream (Stream)
57import 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)
61
58
62import qualified Streamly.Internal.Data.StreamK as K
59import qualified Streamly.Internal.Data.StreamK as K
63
60
64−import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
65import Streamly.Internal.Data.Channel.Types
61import Streamly.Internal.Data.Channel.Types
66
62
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+
67-- | Create a new concurrent stream evaluation channel. The monad
70-- | Create a new concurrent stream evaluation channel. The monad
68-- state used to run the stream actions is captured from the call site of
71-- state used to run the stream actions is captured from the call site of
69-- newChannel.
72-- newChannel.
streamly.cabal+11−8
@@ -375,13 +375,6 @@ library
375 , Streamly.Internal.Data.Unfold.Prelude
375 , Streamly.Internal.Data.Unfold.Prelude
376 , Streamly.Internal.Data.Fold.Prelude
376 , Streamly.Internal.Data.Fold.Prelude
377
377
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
385 , Streamly.Internal.Data.Stream.Concurrent
378 , Streamly.Internal.Data.Stream.Concurrent
386 , Streamly.Internal.Data.Stream.Zip.Concurrent
379 , Streamly.Internal.Data.Stream.Zip.Concurrent
387 , Streamly.Internal.Data.Stream.Time
380 , Streamly.Internal.Data.Stream.Time
@@ -457,7 +450,14 @@ library
457 , Streamly.Data.Stream.Concurrent
450 , Streamly.Data.Stream.Concurrent
458 , Streamly.Data.Stream.Time
451 , Streamly.Data.Stream.Time
459
452
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+
461 , Streamly.Internal.Data.Fold.Async
461 , Streamly.Internal.Data.Fold.Async
462 , Streamly.Internal.Data.Fold.Concurrent.Channel.Type
462 , Streamly.Internal.Data.Fold.Concurrent.Channel.Type
463 , Streamly.Internal.Data.Fold.Concurrent.Channel
463 , Streamly.Internal.Data.Fold.Concurrent.Channel
@@ -466,6 +466,7 @@ library
466 , Streamly.Internal.Data.Unfold.Exception
466 , Streamly.Internal.Data.Unfold.Exception
467 , Streamly.Internal.Data.Unfold.SVar
467 , Streamly.Internal.Data.Unfold.SVar
468
468
469+ -- Deprecated
469 , Streamly.Internal.Data.Stream.Common
470 , Streamly.Internal.Data.Stream.Common
470 , Streamly.Internal.Data.Stream.IsStream.Type
471 , Streamly.Internal.Data.Stream.IsStream.Type
471 , Streamly.Internal.Data.Stream.IsStream.Generate
472 , Streamly.Internal.Data.Stream.IsStream.Generate
@@ -483,6 +484,8 @@ library
483 , Streamly.Internal.Data.Stream.SVar.Generate
484 , Streamly.Internal.Data.Stream.SVar.Generate
484 , Streamly.Internal.Data.Stream.SVar.Eliminate
485 , Streamly.Internal.Data.Stream.SVar.Eliminate
485
486
487+ , Streamly.Internal.Data.Fold.SVar
488+
486 , Streamly.Internal.Data.SVar.Worker
489 , Streamly.Internal.Data.SVar.Worker
487 , Streamly.Internal.Data.SVar.Dispatch
490 , Streamly.Internal.Data.SVar.Dispatch
488 , Streamly.Internal.Data.SVar.Pull
491 , Streamly.Internal.Data.SVar.Pull