title: How do I await multiple promises in-parallel without 'fail-fast' behavior?
body: <p>I'm using <code>async</code>/<code>await</code> to fire several <code>api</code> calls in parallel:</p>
  
  <pre><code>async function foo(arr) {
    const results = await Promise.all(arr.map(v =&gt; {
       return doAsyncThing(v)
    }))
    return results
  }
  </code></pre>
  
  <p>I know that, unlike <code>loops</code>, <code>Promise.all</code> <a href="https://stackoverflow.com/questions/35612428/call-async-await-functions-in-parallel">executes in-parallel</a> (that is, the waiting-for-results portion is in parallel). </p>
  
  <p>But <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all" rel="noreferrer">I also know that</a>:</p>
  
  <blockquote>
    <p>Promise.all is rejected if one of the elements is rejected and
    Promise.all fails fast: If you have four promises which resolve after
    a timeout, and one rejects immediately, then Promise.all rejects
    immediately.</p>
  </blockquote>
  
  <p>As I read this, if I <code>Promise.all</code> with 5 promises, and the first one to finish returns a <code>reject()</code>, then the other 4 are effectively cancelled and their promised <code>resolve()</code> values are lost.</p>
  
  <p>Is there a third way? Where execution is effectively in-parallel, but a single failure doesn't spoil the whole bunch? </p>