Copyright | (c) 2017 Composewell Technologies |
---|---|
License | BSD-3-Clause |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- toChannel :: MonadRunInIO m => Channel m a -> Stream m a -> m ()
- toChannelK :: MonadRunInIO m => Channel m a -> StreamK m a -> m ()
- fromChannel :: MonadAsync m => Channel m a -> Stream m a
- fromChannelK :: MonadAsync m => Channel m a -> StreamK m a
Documentation
toChannel :: MonadRunInIO m => Channel m a -> Stream m a -> m () Source #
Send a stream to a given channel for concurrent evaluation.
toChannelK :: MonadRunInIO m => Channel m a -> StreamK m a -> m () Source #
Write a stream to an SVar
in a non-blocking manner. The stream can then
be read back from the SVar using fromSVar
.
fromChannel :: MonadAsync m => Channel m a -> Stream m a Source #
Generate a stream of results from concurrent evaluations from a channel. Evaluation of the channel does not start until this API is called. This API must not be called more than once on a channel. It kicks off evaluation of the channel by dispatching concurrent workers and ensures that as long there is work queued on the channel workers are dispatched proportional to the demand by the consumer.
fromChannelK :: MonadAsync m => Channel m a -> StreamK m a Source #