4 ms·
I never imagined that the cost of threads was predominantly a performance cost (though obviously that exists too in some parameter regimes). The real cost of t
by adrianratnapala 9y ago
I never imagined that the cost of threads was predominantly a performance cost (though obviously that exists too in some parameter regimes).
The real cost of threads is that threaded code is far more difficult to get right than non-threaded code. The closest thing I know of to an excuse for using threads is that we are already using threads, so all the complixity is already there.
After all, once every line of code is already a potential race condtion, it hardly matters if you turn a few more of them into real ones.