3 ms·
With respect to Promise.all: > In this example, both promises will be processed asynchronously and only when both of them are resolved, we handle the result.
by hn_throwaway_99 7y ago
With respect to Promise.all:
> In this example, both promises will be processed asynchronously and only when both of them are resolved, we handle the result.
While that is true if all the promises resolve successfully, if any of the promises get rejected the catch block gets executed as soon as the first rejection occurs. Beware of that behavior, as if you're not aware of it it can leave your system in a bad state (speaking from experience, of course :)