186
async vs parallel
Async waits without blocking a thread. Parallel uses more than one core. They are not synonyms.
What is async vs parallel?
Asynchrony interleaves waiting — usually on I/O — on few threads. Parallelism runs work at the same time on several cores. CPU-bound work does not get faster by wrapping it in async. I/O-bound work does not need a thread per request.
Why does async vs parallel matter when vibe coding?
Models sprinkle async on a CPU loop and expect speed, or they start a thousand threads for HTTP. Name which bottleneck you have.
How do you do async vs parallel?
I/O: async with a bounded number of in-flight calls. CPU: a limited worker pool. Do not block the event loop with heavy compute. Do not unbounded-Promise.all a million rows.
How do you ask a model for async vs parallel?
(Work) is I/O-bound, so use async with a concurrency limit. Do not use a thread per request. Do not block the event loop with CPU work; move that to a bounded pool. Do not Promise.all an unbounded list.
What goes wrong with async vs parallel?
async functions that secretly run sequentially because you awaited inside a loop. If they are independent, overlap them — with a limit.