Created
July 29, 2015 07:13
-
-
Save mosfet1kg/45d12bc1507e65a864e1 to your computer and use it in GitHub Desktop.
npm Q parallel excution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Q = require('q'); | |
Q.fcall([ | |
(function(){ | |
setTimeout(function(){ | |
console.log('func1'); | |
},5000) | |
})(), | |
(function(){ | |
setTimeout(function(){ | |
console.log('func2'); | |
},5000) | |
})() | |
]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment