Check out async.parallel. You would essentially write:
async.parallel( [
function ( callback ) {
// Code
},
function ( callback ) {
// Code
}
], function ( error, results ) {
// Both done
} );
Check out [async.parallel][1]. You would essentially write:
async.parallel( [
function ( callback ) {
// Code
},
function ( callback ) {
// Code
}
], function ( error, results ) {
// Both done
} );
[1]: https://github.com/caolan/async#parallel