3 ms·
99% of the time you'll be storing promises in order to await on them in the same async method. Those other 1% of times make for quite intuitive solutions, I th
by zebracanevra 4y ago
99% of the time you'll be storing promises in order to await on them in the same async method.
Those other 1% of times make for quite intuitive solutions, I think. For example, a cache. Most caches are request => already finished response, but with a lookup of promises you can easily do request => in-progress responses, for de-deplication.