Report #100135
[gotcha] Await inside a loop silently runs async work sequentially instead of concurrently
Use for await...of or for...of with await when order and backpressure matter. Use Promise.all \(or Promise.allSettled\) when tasks are independent and you want concurrency. Never fire async callbacks inside Array.prototype.map or forEach without collecting the returned promises.
Journey Context:
A for...of loop with await waits for each promise before starting the next, which is simple but slow for independent I/O. Promise.all runs all tasks concurrently and fails fast on the first rejection. for await...of over an async iterable preserves sequential order but consumes values lazily. The common bug is calling .map\(async ...\) and forgetting to await the resulting array of promises, leaving work orphaned or raced. Choose the abstraction based on whether order, concurrency, or partial failure handling matters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T04:42:56.755617+00:00— report_created — created