Run several asynchronous functions in parallel
I have one object which contains two different methods
var samp {
m1: func1,
m2: func2
}
Depending on the number of keys I want to call all the three function
parallely Now Im using the following code which runs serially.
switch (sampType) {
case "m1":
{
return new func1();
break;
}
case "m2":
{
return new func2();
break;
}
default:
{
}
}
How can I execute all the methods parallely in node.js? Any help on this
will be really helpful
No comments:
Post a Comment