Module persistent_queue

Persistent FIFO queue backed by Luanti ModStorage.

Queue contents must be serializable with core.serialize.

Functions

push (v) Push a value onto the queue.
pop () Pop the next value from the queue.
size () Get queue size.
is_empty () Check if queue is empty.


Functions

push (v)
Push a value onto the queue.

Parameters:

  • v Serializable value.

Returns:

    boolean True if inserted, false if queue full.
pop ()
Pop the next value from the queue.

Returns:

    any Value or nil if empty.
size ()
Get queue size.

Returns:

    number
is_empty ()
Check if queue is empty.

Returns:

    boolean
generated by LDoc 1.5.0 Last updated 2026-03-13 21:12:31