4 ms·
> With this flavor of Javascript you can no longer do two asynchronous tasks at the same time, everything will be executed synchronously. The main pattern I us
by madsbuch 5y ago
> With this flavor of Javascript you can no longer do two asynchronous tasks at the same time, everything will be executed synchronously.
The main pattern I use to dispatch multiple promises is resilient to this:
const [r1, r2, r3] = await Promise.all([
async () => { ... },
async () => { ... },
async () => { ... }
])
- nayuki 5y agoNo. I think your code will be transformed into: const [r1, r2, r3] = await Promise.all(await [ await (async () => { ... }), await (async () => { ... }), await (async () => { ... }), ]);