Proposal: `await.all {...}` for parallelism

Naveen Chawla naveen.chwl at gmail.com
Thu Nov 21 22:15:59 UTC 2019


Yes of course, I was responding to your proposal and the subsequent email
about it being incompatible with existing JavaScript because "await" on its
own accepts non-promises, so wouldn't return an array of results from an
array of promises, hence why I proposed await.all etc.

On Thu, 21 Nov 2019 at 18:29, manuelbarzi <manuelbarzi at gmail.com> wrote:

> I have a solution for that:
>>
>> const promises = [...]
>> await.all promises //returns an array of results
>> await.race promises //returns a single result
>>
>
> well, my proposal is exactly that, but doing `await.all` by default with
> just `await`.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20191121/8d5c2874/attachment-0001.html>


More information about the es-discuss mailing list