Module persistent_queue.lua
Persistent FIFO queue backed by Luanti ModStorage.
Queue contents must be serializable with core.serialize.
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