Move callback to top of function

This commit is contained in:
Jérémie N'gadi
2017-08-28 12:52:20 +02:00
parent fd37b71ab1
commit 99ac342720
+4
View File
@@ -33,6 +33,10 @@ end
function Async.parallelLimit(tasks, limit, cb)
if #tasks = 0 then
cb(results)
end
local remaining = #tasks
local running = 0
local queue = {}