# HG changeset patch # User Matthew Wild # Date 1758815663 -3600 # Node ID f50a9746fec090d3e3bd25166711c45cd6872749 # Parent 01f95f3de6fcd1d748a90c0a00a616ce09ddc49d util.queue: Convenience functions for empty/full diff -r 01f95f3de6fc -r f50a9746fec0 util/queue.lua --- a/util/queue.lua Thu Sep 25 16:53:35 2025 +0100 +++ b/util/queue.lua Thu Sep 25 16:54:23 2025 +0100 @@ -21,6 +21,8 @@ _items = t; size = size; count = function (self) return items; end; + empty = function () return items == 0; end; + full = function () return items == size; end; push = function (self, item) if items >= size then if allow_wrapping then