10 / 17

How can you handle multiple Promises concurrently without using `Promise.all()`?

Difficulty: 5/10

You can either chose in built methods like allsettled(), race(), any().

  1. 1

    Promise.race(): The first resolved Promise (or the first rejected one) will determine the outcome.

  2. 2

    promise.allSettled : Fulfills when all promises settle.

  3. 3

    promise.any(). Fulfils when any of the promises are fulfilled; rejects when all of the promises are rejected.

Manual async/await Triggering (Array.map) By initiating all promises before awaiting them, they execute concurrently in the background. You can then await them individually using Array.map() inside Promise.allSettled or a custom tracking loop.
Custom Concurrency Manager (Semaphore / Pool) When handling dozens or hundreds of requests, running everything in parallel can exhaust memory or hit API rate limits. You can control maximum concurrency using an async pool pattern:
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.