Queue.Tx
Transactions on queues.
to_seq s
returns a domain safe sequence for iterating through the elements of the queue front to back.
The sequence is based on a constant time, O(1)
, snapshot of the queue and modifications of the queue have no effect on the sequence.
peek_opt q
returns the first element in queue q
, without removing it from the queue, or returns None
if the queue is empty.