streamly-0.9.0: Streaming, dataflow programming and declarative concurrency
Copyright(c) 2017 Composewell Technologies
LicenseBSD-3-Clause
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Streamly.Internal.Data.Stream.Channel.Worker

Contents

Description

Collecting results from child workers in a streamed fashion

Synopsis

Documentation

data Work Source #

Instances

Instances details
Show Work Source # 
Instance details

Defined in Streamly.Internal.Data.Stream.Channel.Worker

Methods

showsPrec :: Int -> Work -> ShowS #

show :: Work -> String #

showList :: [Work] -> ShowS #

workerRateControl :: Limit -> IORef Int -> YieldRateInfo -> WorkerInfo -> IO Bool Source #

CAUTION! this also updates the yield count and therefore should be called only when we are actually yielding an element.

Send Events

sendYield :: Limit -> Limit -> IORef Int -> Maybe WorkerInfo -> Maybe YieldRateInfo -> IORef ([ChildEvent a], Int) -> MVar () -> ChildEvent a -> IO Bool Source #

Returns whether the worker should continue (True) or stop (False).