Module
IxQueue
- Package
- purescript-queue
- Repository
- athanclark/purescript-queue
Queues with an indexed mapping of handlers - this is useful for sending messages to a set of recipients, where removing them individually from the queue at runtime is necessary. This could be useful in interfaces where the set of listening handlers is unknown and dynamic, mimicking global access to updated values.
#broadcastMany Source
broadcastMany :: forall rw a. IxQueue (write :: WRITE | rw) a -> NonEmptyArray a -> Effect Unit
#broadcastManyExcept Source
broadcastManyExcept :: forall rw a. IxQueue (write :: WRITE | rw) a -> Array String -> NonEmptyArray a -> Effect Unit
Application policy is such that the inputs will be applied uniformly to all handlers, sorted by
#readBroadcast Source
readBroadcast :: forall rw a. IxQueue rw a -> Effect (Array a)
Read only broadcast pending values (if any), without removing them from the queue.
#takeBroadcast Source
takeBroadcast :: forall rw a. IxQueue (write :: WRITE | rw) a -> Effect (Array a)
Removes only the globally pending inputs