I would like to know if this will work to avoid 100% of CPU usage.
Environment.ProcessorCount will get back Logical Processors Count, In my case i7 4 real cores 8 logical. In some other cases it can differently. But what matters is CPU usage. If I use my application to use Environment.ProcessorCount cores it will use 100% on my PC. What if I do
string lesscpu = Environment.ProcessorCount - 1;
So baisclly removing 1 core. On my PC it will be 7 cores and around 80-90% CPU usage. in some other cases:
2 cores 2 logical = 1 = 50% cpu
2 cores 4 logical = 3 = 70%+ cpu
2 cores 6 logical = 5 = 70%+ cpu
is this true?
UPDATE:
This heavy lifting happens when I'm idle the program will switch off to 1 thread when I'm back... I afraid that if I leave it for long hours on 100% CPU on all cores my pc can overheat and restart or even worse?...