fixing bugs

This commit is contained in:
2026-03-23 20:40:58 -07:00
parent 0a92890290
commit 2fec5b39b8
3 changed files with 320 additions and 186 deletions
+10 -6
View File
@@ -58,16 +58,20 @@ function multi:newSystemThreadedQueue(name)
GLOBAL[name] = c
end
local peek = function()
return c:peek()
end
local pop = function()
return c:pop()
end
function c:Hold(opt)
local multi, thread = require("multi"):init()
if opt.peek then
return thread.hold(function()
return self:peek()
end)
return thread.hold(peek)
else
return thread.hold(function()
return self:pop()
end)
return thread.hold(pop)
end
end