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

manuelbarzi manuelbarzi at
Mon Nov 25 17:36:18 UTC 2019

> I don't think I like "await ||" as a syntax, because it doesn't have
> anything to do with the "OR" operator.

it is just a quick proposal to symbolise parallelism easily (||), but just
that, of course it could be any other more convenient symbol

> Manuel, I am not sure I understand your examples. You are consuming the
> values x1 and x2 in p4 right in the middle of the same async block that
> contains the "await ||" statements that produce them. They are not
> guaranteed to resolve until after that block is over, no?

the `async {}` block would group only the parallel awaits (`await||`) into
a `Promise.all` and would chain it in order with the other series awaits
inside (normal `await`).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list