Module
Concurrent.Channel
- Package
- purescript-channel
- Repository
- ConnorDillon/purescript-channel
#Input Source
newtype Input a
An Input
is a wrapper around a function that receive values from a Channel
.
Constructors
Instances
#newChannel Source
newChannel :: forall a. Effect (Channel a a)
Creates a new Channel
using an AVar
backend.
#avarChannel Source
avarChannel :: forall a. AVar a -> Effect (Channel a a)
Creates a new Channel
with a provided AVar
as backend.
#sendTraversable Source
sendTraversable :: forall t a. Traversable t => Output a -> t a -> Aff Boolean
Sends a Traversable
into an Output
. Returns false
if the Output
was closed
before the entire traversable was sent.
- Modules
- Concurrent.
Channel
Will try to send to the first
Output
and if it is closed, then to the second.