Skip to content

Instantly share code, notes, and snippets.

@arumons
Created June 3, 2012 15:48
Show Gist options
  • Save arumons/2863954 to your computer and use it in GitHub Desktop.
Save arumons/2863954 to your computer and use it in GitHub Desktop.
function parallel(callbacks, callback)
local next
local count = #callbacks
next = function()
count = count - 1
if count == 0 then
callback()
end
end
for i, v in ipairs(callbacks) do
v(next)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment