Skip to content

Instantly share code, notes, and snippets.

@soldair
Created July 2, 2013 17:42
Show Gist options
  • Save soldair/5911432 to your computer and use it in GitHub Desktop.
Save soldair/5911432 to your computer and use it in GitHub Desktop.
what i do instead of using the "async" module
// do series or exactly N parallel its the same
var c = jobs.length
, job = function(){
doThing(function(){
next()
})
}, next = function(){
c--;
if(!c) done();
else job()
}, done = function(){
cb()
};
job();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment