Module

Webb.Channel.Internal.State

Package
purescript-webb-channel
Repository
mitchellandwebb/webb-channel

#ChannelState Source

type ChannelState = { id :: ShowRef Id, open :: ShowRef Boolean, receivers :: ShowRef (RQueue), senders :: ShowRef (SQueue) }

#newState Source

newState :: forall m. MonadEffect m => SendSize -> m (ChannelState)

#nextId Source

nextId :: forall m. MonadEffect m => CState -> m Id

#isOpen Source

isOpen :: forall m. MonadEffect m => CState -> m Boolean

#isClosed Source

isClosed :: forall m. MonadEffect m => CState -> m Boolean

#close Source

close :: forall m. MonadEffect m => CState -> m Unit

#sendSize Source

sendSize :: forall m. MonadEffect m => CState -> m Int

#receiveSize Source

receiveSize :: forall m. MonadEffect m => CState -> m Int

#hasSenders Source

hasSenders :: forall m. MonadEffect m => CState -> m Boolean

#hasReceivers Source

hasReceivers :: forall m. MonadEffect m => CState -> m Boolean