Lua library module "queue"

Author: Hans van der Meer

The Lua module queue is a C-module for the manipulation of queues.

API

Remarks

  1. The calling sequences below assume the module has the name queue assigned to it from the require.
  2. Calling queue functions is in object notation with q as the variable name.
  3. Functions that return the queue allow chaining of operations.

Create queue

queue.new([name]) empty queue, optional name
returns queue, create and new are synomyms

Stack fill

q:enqueue(item[,[item[,...]]) queue arguments
q:clear() make queue empty
both return queue

Get values

q:dequeue() dequeue and return front of queue, or nil
q:front() return front of queue or nil

Query state

q:empty() return true/false for queue empty/notempty
q:size(), #q return length of queue
q:ident() identity stamp, name or nil
q:print() header plus full contents string
queue.version() return version of module