How many threads does it take to make them a bad choice?

前端 未结 15 2550
猫巷女王i
猫巷女王i 2021-02-07 21:46

I have to write a not-so-large program in C++, using boost::thread.

The problem at hand, is to process a large (maybe thousands or tens of thousands. Hundreds and millon

15条回答
  •  暖寄归人
    2021-02-07 22:30

    As a ballpark number, you should probably keep the thread count between 10 and 100 to minimize lock contention and context switching overhead.

提交回复
热议问题