An unbounded FIFO data structure for concurrent access.
newtype Queue a
An unbounded Queue fit for concurrent access.
new :: forall a. Aff (Queue a)
Creates a new Queue.
read :: forall a. Queue a -> Aff a
Reads a value from the queue. Blocks if the queue is empty, and resumes
when it has been written to.
write :: forall a. Queue a -> a -> Aff Unit
Writes a new value into the queue
tryRead :: forall a. Queue a -> Aff (Maybe a)
Attempts to read a value from the queue. Fails with Nothing if the queue
CAREFUL! This will block if other readers are blocked on the