Re:I Avoid Async/Await
by zebracanevra on Saturday April 16, 2022 @06:58AM
(#31051364)
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.
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.