What to avoid for performance reasons in multithreaded code?

后端 未结 12 2434
执笔经年
执笔经年 2021-02-09 10:45

I\'m currently reviewing/refactoring a multithreaded application which is supposed to be multithreaded in order to be able to use all the available cores and theoretically deliv

12条回答
  •  无人及你
    2021-02-09 11:40

    Threads don't equal performance, always.

    Things are a lot better in certain operating systems as opposed to others, but if you can have something sleep or relinquish its time until it's signaled...or not start a new process for virtually everything, you're saving yourself from bogging the application down in context switching.

提交回复
热议问题