I'm building a VSPackage and my project demands that the package will not consume over then 50% CPU. How can I limit it from the program?
Note: I'm not interesting in prioritizing, I need to set CPU usage to 50% (hard coded).
I'm building a VSPackage and my project demands that the package will not consume over then 50% CPU. How can I limit it from the program?
Note: I'm not interesting in prioritizing, I need to set CPU usage to 50% (hard coded).
Create one or more threads within your extension that run with priority ThreadPriority.Lowest
. Even better than manual throttling, this solution will use the CPU to its full extent unless another task (inside or outside Visual Studio) needs to compute something.