CPU throttling in C++

后端 未结 5 830
半阙折子戏
半阙折子戏 2021-02-06 20:53

I was just wondering if there is an elegant way to set the maximum CPU load for a particular thread doing intensive calculations.

Right now I have located the most tim

5条回答
  •  清歌不尽
    2021-02-06 21:54

    You may be able to change the priority of a thread, but changing the maximum utilization would either require polling and hacks to limit how many things are occurring, or using OS tools that can set the maximum utilization of a process. However, I don't see any circumstance where you would want to do this.

提交回复
热议问题