Yes, I think you nailed it. I didn’t make the connection before. Instead of
awaiting upfront, forcing the async operations to run in sequence, the
awaits are ‘moved’ to the variables themselves, allowing the async ops to
run in parallel (as much as possible), and once one such variable is used
(in any form), the async function makes sure to pause execution in order to
wait for the value to resolve.

As I’ve said elsewhere in this thread, we would get optimal concurrency
without having to micromanage the promises.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to