6 ms·
FYI, Promise.all does not guarantee that. It doesn't orchestrate actually running the Promises at all (this is impossible the way Promises work), just that they
by exogen 9y ago
FYI, Promise.all does not guarantee that. It doesn't orchestrate actually running the Promises at all (this is impossible the way Promises work), just that they're all resolved at the end, with results in the same order they were passed in.
- itwy 9y agoWhat is the difference then?
- hdhzy 9y agoNone from the perspective of the consumer. The implementation of Promise.all could use one array for results and fill it in any order as soon as any promise resolves while awaits will always proceed in strict order (like a generator). But that's an implementation detail that a JS programmer doesn't need to think about.
- itwy 9y agoThanks for the clarification.