News for hackers. Stuff that matters.
Re:Mistakes we make using JavaScript Promises by pault on Friday July 05, 2019 @10:33AM (#20362788)
That's fine, but you'll still only be able to block on one promise at a time. If you want to wait until all promises have resolved you still have to use Promise. all.
Re:Mistakes we make using JavaScript Promises by Nullabillity on Friday July 05, 2019 @12:29PM (#20363741)
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()]);
Re:Mistakes we make using JavaScript Promises by pault on Tuesday July 09, 2019 @03:49PM (#20395850)
Whoops, you're right! I hadn't thought it through.