on master help sign in
Rename "bound" to "boundThreads"
commit3f841aadee360ea2a96d271239f8edeaac1f11c0 authorHarendra Kumar <harendra@composewell.com> dateSun 26 Nov 2023, 12:59 (3 years ago) parent0285479
4 files changed+9−8
src/Streamly/Data/Fold/Prelude.hs+1−1 src/Streamly/Internal/Data/Fold/Concurrent.hs+1−1 src/Streamly/Internal/Data/Fold/Concurrent/Channel.hs+1−1 src/Streamly/Internal/Data/Stream/Channel/Types.hs+6−5
src/Streamly/Data/Fold/Prelude.hs+1−1
@@ -20,7 +20,7 @@ module Streamly.Data.Fold.Prelude
2020 -- ** Configuration
2121 , Config
2222 , maxBuffer
23− , bound
23+ , boundThreads
2424 , inspect
2525
2626 -- ** Combinators
src/Streamly/Internal/Data/Fold/Concurrent.hs+1−1
@@ -53,7 +53,7 @@ module Streamly.Internal.Data.Fold.Concurrent
5353 -- * Configuration
5454 Config
5555 , maxBuffer
56− , bound
56+ , boundThreads
5757 , inspect
5858
5959 -- * Combinators
src/Streamly/Internal/Data/Fold/Concurrent/Channel.hs+1−1
@@ -14,7 +14,7 @@ module Streamly.Internal.Data.Fold.Concurrent.Channel
1414 -- * Configuration
1515 , Config
1616 , maxBuffer
17− , bound
17+ , boundThreads
1818 , inspect
1919
2020 -- * Fold operations
src/Streamly/Internal/Data/Stream/Channel/Types.hs+6−5
@@ -76,7 +76,7 @@ module Streamly.Internal.Data.Stream.Channel.Types
7676 , stopWhen
7777 , ordered
7878 , interleaved
79− , bound
79+ , boundThreads
8080
8181 , rate
8282 , avgRate
@@ -546,13 +546,14 @@ interleaved flag st = st { _interleaved = flag }
546546getInterleaved :: Config -> Bool
547547getInterleaved = _interleaved
548548
549+-- TODO: Make it consistently take effect everywhere.
550+
549551-- | Spawn bound threads (i.e., spawn threads using 'forkOS' instead of
550552-- 'forkIO'). The default value is 'False'.
551553--
552−-- Currently, this only takes effect for concurrent folds. TODO: Make it
553−-- consistently take effect everywhere.
554−bound :: Bool -> Config -> Config
555−bound flag st = st { _bound = flag }
554+-- Currently, this only takes effect only for concurrent folds.
555+boundThreads :: Bool -> Config -> Config
556+boundThreads flag st = st { _bound = flag }
556557
557558getBound :: Config -> Bool
558559getBound = _bound