Hacker News new | ask | show | jobs
by jerf 391 days ago
The more threads you have doing something, the higher the probability you have at least one thread doing something that you don't want to have interrupted just because some other thread, somewhere, failed.

The lock case mentioned by littlestymaar is an important "program correctness" consideration, but also consider something like a instant message or chat server like Slack. You don't want the entire server with thousands of connections to crash just because one thread somewhere crashed. It's expensive to reconnect the system after that.

Also, the more threads you are running, the higher the odds get that one of them will panic somewhere, somehow. The numbers start adding up.

Each of these two effects conspire to make the other one worse as you scale up.