Module

IOQueues

Package
purescript-queue
Repository
athanclark/purescript-queue

#IOQueues Source

newtype IOQueues q input output

Represents an asynchronously invokable function input -> Aff output

Constructors

#new Source

new :: forall q output input. Queue q => QueueScope q => Effect (IOQueues q input output)

#callAsync Source

callAsync :: forall q output input. Queue q => QueueScope q => IOQueues q input output -> input -> Aff output

Invoke the queue in Aff.

#callAsyncEff Source

callAsyncEff :: forall q output input. Queue q => QueueScope q => IOQueues q input output -> Handler output -> input -> Effect Unit

Invoke the queue in Eff

#registerSync Source

registerSync :: forall q output input. Queue q => IOQueues q input output -> (input -> Effect output) -> Effect Unit

For binding the receiver

#registerSyncOnce Source

registerSyncOnce :: forall q output input. Queue q => IOQueues q input output -> (input -> Effect output) -> Effect Unit

Bind a receiver only once