Improve async.step

This commit is contained in:
hrsh7th
2021-11-05 21:32:30 +09:00
parent d9e4ac5997
commit d0231d06de

View File

@@ -39,9 +39,9 @@ end
async.step = function(...) async.step = function(...)
local tasks = { ... } local tasks = { ... }
local next local next
next = function() next = function(...)
if #tasks > 0 then if #tasks > 0 then
table.remove(tasks, 1)(next) table.remove(tasks, 1)(next, ...)
end end
end end
table.remove(tasks, 1)(next) table.remove(tasks, 1)(next)