#make Source

make :: forall m a. MonadEffect m => m (BusRW a)

Creates a new bidirectional Bus which can be read from and written to.

#read Source

read :: forall a r. BusR' r a -> Aff a

Blocks until a new value is pushed to the Bus, returning the value.

#write Source

write :: forall a r. a -> BusW' r a -> Aff Unit

Pushes a new value to the Bus, yieldig immediately.

#split Source

split :: forall a. BusRW a -> Tuple (BusR a) (BusW a)

Splits a bidirectional Bus into separate read and write Buses.

#kill Source

kill :: forall a r. Error -> BusW' r a -> Aff Unit

Kills the Bus and propagates the exception to all pending and future consumers.

#isKilled Source

isKilled :: forall m a r. MonadEffect m => BusR' r a -> m Boolean

Synchronously checks whether a Bus has been killed.

#Cap Source

data Cap

#Bus Source

data Bus (r :: Row Type) a

#BusRW Source

type BusRW = Bus (read :: Cap, write :: Cap)

#BusR Source

type BusR = BusR' ()

#BusR' Source

type BusR' r = Bus (read :: Cap | r)

#BusW Source

type BusW = BusW' ()

#BusW' Source

type BusW' r = Bus (write :: Cap | r)