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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -