Created
January 14, 2019 10:58
-
-
Save batrudinych/2b91f75ef796527b8dfe4d45e571c08e to your computer and use it in GitHub Desktop.
Running async operations in parallel and harvesting the results
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
async function take2() { | |
// Running Promises in parallel | |
const listOfPromises = listOfArguments.map(asyncOperation); | |
// Harvesting | |
return await Promise.all(listOfPromises); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment