javascript - Promises.all() tracking invidual tasks completion -


i'm using promise.all(tasks) track overall completion of tasks executed in no particular order (which main aim). want track individual tasks completion, how do that?

nothing keeps attaching individual handlers awaiting them together:

let tasks = …; ([t, i] of tasks.entries())     t.then(res => {         console.log("task "+i+" completed with", res);     }, err => {         console.log("task "+i+" failed because", err);     }); promise.all(tasks).then(all => {     console.log("all tasks completed"); }, err => {     console.log("something failed"); }); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -