3 ms·
Promises are started eagerly, so const xP = getX(); const yP = getY(); const x = await xP; const y = await yP; is just as parallel as con
by Nullabillity 7y ago
Promises are started eagerly, so
const xP = getX();
const yP = getY();
const x = await xP;
const y = await yP;
is just as parallel as
const [x, y] = Promise.all([getX(), getY()]);
- pault 7y agoWhoops, you're right! I hadn't thought it through.