Copyright | (c) 2017 2022 Composewell Technologies |
---|---|
License | BSD-3-Clause |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Channel m a b = Channel {
- outputQueue :: IORef ([ChildEvent a], Int)
- maxBufferLimit :: Limit
- outputDoorBell :: MVar ()
- readOutputQ :: m [ChildEvent a]
- outputQueueFromConsumer :: IORef ([ChildEvent b], Int)
- outputDoorBellFromConsumer :: MVar ()
- bufferSpaceDoorBell :: MVar ()
- svarRef :: Maybe (IORef ())
- svarStats :: SVarStats
- svarInspectMode :: Bool
- svarCreator :: ThreadId
- newChannel :: MonadRunInIO m => (Config -> Config) -> Fold m a b -> m (Channel m a b)
- data Config
- sendToWorker :: MonadAsync m => Channel m a b -> a -> m (Maybe b)
- checkFoldStatus :: MonadAsync m => Channel m a b -> m (Maybe b)
- dumpSVar :: Channel m a b -> IO String
Documentation
Channel | |
|
newChannel :: MonadRunInIO m => (Config -> Config) -> Fold m a b -> m (Channel m a b) Source #
An abstract type for specifying the configuration parameters of a
Channel
. Use Config -> Config
modifier functions to modify the default
configuration. See the individual modifier documentation for default values.
sendToWorker :: MonadAsync m => Channel m a b -> a -> m (Maybe b) Source #
Push values from a driver to a fold worker via a Channel. Before pushing a
value to the Channel it polls for events received from the fold worker. If a
stop event is received then it returns True
otherwise false. Propagates
exceptions received from the fold wroker.
checkFoldStatus :: MonadAsync m => Channel m a b -> m (Maybe b) Source #