Implementation of a queue. The underlying implementation uses a seq. Note: For inter thread communication use a TChannel instead.
Procs
proc initQueue[T](initialSize = 4): Queue[T]
- creates a new queue. initialSize needs to be a power of 2. Source
proc len[T](q: Queue[T]): int
- returns the number of elements of q. Source
proc add[T](q: var Queue[T]; item: T)
- adds an item to the end of the queue q. Source
proc enqueue[T](q: var Queue[T]; item: T)
- alias for the add operation. Source
proc dequeue[T](q: var Queue[T]): T
- removes and returns the first element of the queue q. Source
proc `$`[T](q: Queue[T]): string
- turns a queue into its string representation. Source