NevermoreEngine/src/queue at main · Quenty/NevermoreEngine · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

Queue

Queue class with better performance characteristics than table.remove()

Installation

npm install @quenty/queue --save

Usage

local queue = Queue.new()
queue:PushRight("a")
queue:PushRight("b")
queue:PushRight("c")

while not queue:IsEmpty() do
    local entry = queue:PopLeft()
    print(entry) --> a, b, c
end