4 ms·
> But you wouldn't call a million tasks with `Promise.all` in Node, right? That's just not a thing that one does. But neither would you wait on a waitgroup of
by hamandcheese 2y ago
> But you wouldn't call a million tasks with `Promise.all` in Node, right? That's just not a thing that one does.
But neither would you wait on a waitgroup of size 1 million in Go... right?
- rtpg 2y agoyeah, right? I mean I don't have a dog in this race, just wished we could get into "normal" repros without having to wonder if some magic is kicking in
- ricardobeat 2y agoYou could, and the tasks would run concurrently. Node is single threaded so unless you used one of the I/O calls backed by a thread pool, they would all execute sequentially .
- rfoo 2y agoFor a goroutine doing nothing, no. But if I have 1 million tasks which spent 10% of their time on CPU-bound codes, intermixed with other IO-bound codes, and I just want throughput and I'm too lazy to use a proper task queue, then why not?