4 ms·
> What if I have multiple Ruby APIs to hit? Then hit them with multiple concurrent threads and move on.
by schneems 9y ago
> What if I have multiple Ruby APIs to hit?
Then hit them with multiple concurrent threads and move on.
- flavio81 9y ago... do you think available memory and CPU time do not decrease when you spawn more threads?
- schneems 9y agoUse threads. They exist. Use em'. Know what threads are really good at? Hiding IO time. They're like REALLY good at it. When a thread is blocked on IO, it's not spinning your CPU. So is the thread "free"? No. Is it pretty cheap compared to re-writing an app in another lang? Yes.
- mnm1 9y agoAnd if I need to hit them in serial?