Setting a timeout for each promise within a promise.all
问题 I am able to successfully perform a Promise.all, and gracefully handle resolves and rejects. However, some promises complete within a few milliseconds, some can/could take a while. I want to be able to set a timeout for each promise within the Promise.all, so it can attempt to take a maximum of say 5seconds. getData() { var that = this; var tableUrls = ['http://table-one.com','http://table-two.com']; var spoonUrls = ['http://spoon-one.com','http://spoon-two.com']; var tablePromises = that