You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an async function that executes some shell commands in parallel
require("fs").readdir("./", function (error, folders) { // asynched
require("underscore")._(folders).each(function (folder, folderKey, folderList) { // asynched
r("child_process").exec("ls ./" + folder, function(error, stdout, stderr) {
console.log("Cant put it here") // Will be run after the first execution is completed
})
console.log("Cant put it here either") // Will be run immediately before any execution is completed
})
console.log("Cant put it here either") // Will be run immediately before any execution is completed
})
I want to do something after those shell commands are executed but I cant figure out how to do this with async library. Those shell commands are executed in parallel, so there is no way to register a handler that is executed after all of them are executed.
Any ideas?
The text was updated successfully, but these errors were encountered:
I have an async function that executes some shell commands in parallel
I want to do something after those shell commands are executed but I cant figure out how to do this with async library. Those shell commands are executed in parallel, so there is no way to register a handler that is executed after all of them are executed.
Any ideas?
The text was updated successfully, but these errors were encountered: