How can one set up a thread in C# to only execute when CPU is idle?
c#, cpu-usage, windows-services
Solution
You can let the OS handle it for you like this:
Thread thread = Thread.CurrentThread;
thread.Priority = ThreadPriority.Lowest;
Problem
I have a Windows Service in C#. I want a certain thread to perform specific actions, but only when the CPU is idle. Is there a way to do this in C#.