Comment by inlined
4 years ago
But then how do you gather promises together to run them in parallel? For sophisticated apps this is crucial.
4 years ago
But then how do you gather promises together to run them in parallel? For sophisticated apps this is crucial.
Each promise you create are executed already on creation.
But you gather them by using:
`await Promise.allSettled([promise1, promise2, promise3])`
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I would assume they would create an array with a bunch of Futures that would resolve at the end of the assignment, or the std lib would offer some ability to explicitly make things run in parallel.
Or queues, graphs, or other chaining behavior I can't predict you'll need as a tool author.